[llvm-commits] CVS: llvm/lib/Target/CBackend/CBackend.cpp

Reid Spencer reid at x10sys.com
Thu Jan 11 20:25:29 PST 2007



Changes in directory llvm/lib/Target/CBackend:

CBackend.cpp updated: 1.311 -> 1.312
---
Log message:

Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.


---
Diffs of the changes:  (+1 -1)

 CBackend.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/CBackend/CBackend.cpp
diff -u llvm/lib/Target/CBackend/CBackend.cpp:1.311 llvm/lib/Target/CBackend/CBackend.cpp:1.312
--- llvm/lib/Target/CBackend/CBackend.cpp:1.311	Thu Jan 11 12:21:29 2007
+++ llvm/lib/Target/CBackend/CBackend.cpp	Thu Jan 11 22:24:45 2007
@@ -829,7 +829,7 @@
   if (ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) {
     const Type* Ty = CI->getType();
     if (Ty == Type::Int1Ty)
-      Out << (CI->getBoolValue() ? '1' : '0') ;
+      Out << (CI->getZExtValue() ? '1' : '0') ;
     else {
       Out << "((";
       printPrimitiveType(Out, Ty, false) << ')';






More information about the llvm-commits mailing list