[llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp
Reid Spencer
reid at x10sys.com
Thu Jan 11 20:25:30 PST 2007
Changes in directory llvm/tools/llvm2cpp:
CppWriter.cpp updated: 1.30 -> 1.31
---
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)
CppWriter.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/tools/llvm2cpp/CppWriter.cpp
diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.30 llvm/tools/llvm2cpp/CppWriter.cpp:1.31
--- llvm/tools/llvm2cpp/CppWriter.cpp:1.30 Thu Jan 11 12:21:29 2007
+++ llvm/tools/llvm2cpp/CppWriter.cpp Thu Jan 11 22:24:46 2007
@@ -671,7 +671,7 @@
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
if (CI->getType() == Type::Int1Ty)
Out << "ConstantInt* " << constName << " = ConstantInt::get("
- << (CI->getBoolValue() ? "true" : "false") << ");";
+ << (CI->getZExtValue() ? "true" : "false") << ");";
else
Out << "ConstantInt* " << constName << " = ConstantInt::get("
<< typeName << ", " << CI->getZExtValue() << ");";
More information about the llvm-commits
mailing list