[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

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



Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.144 -> 1.145
---
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)

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


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.144 llvm/lib/Bytecode/Writer/Writer.cpp:1.145
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.144	Thu Jan 11 12:21:28 2007
+++ llvm/lib/Bytecode/Writer/Writer.cpp	Thu Jan 11 22:24:45 2007
@@ -322,7 +322,7 @@
 
   switch (CPV->getType()->getTypeID()) {
   case Type::Int1TyID:    // Boolean Types
-    if (cast<ConstantInt>(CPV)->getBoolValue())
+    if (cast<ConstantInt>(CPV)->getZExtValue())
       output_vbr(1U);
     else
       output_vbr(0U);






More information about the llvm-commits mailing list