summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-10 05:16:44 +0000
committerChris Lattner <sabre@nondot.org>2004-02-10 05:16:44 +0000
commitff04d76c579e589b3cc8a8c7eadff9faa2417d38 (patch)
tree490d8700641b374e749d71346686c3d652044cc8 /llvm/lib/Target
parent4766d0c680f4e79f4acde5385f32fe8ca1428444 (diff)
downloadbcm5719-llvm-ff04d76c579e589b3cc8a8c7eadff9faa2417d38.tar.gz
bcm5719-llvm-ff04d76c579e589b3cc8a8c7eadff9faa2417d38.zip
Fix PR228: [sparc] Boolean constants are emitted as true and false
I will observe that the concept of using WriteAsOperand is completely broken, but then we all knew that, didn't we? llvm-svn: 11255
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Sparc/EmitAssembly.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp
index 863ffd7007a..277da698273 100644
--- a/llvm/lib/Target/Sparc/EmitAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp
@@ -340,6 +340,8 @@ void AsmPrinter::printSingleConstantValue(const Constant* CV) {
toAsm << "\t! " << CV->getType()->getDescription()
<< " value: " << Val << "\n";
+ } else if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
+ toAsm << (int)CB->getValue() << "\n";
} else {
WriteAsOperand(toAsm, CV, false, false) << "\n";
}
OpenPOWER on IntegriCloud