[llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp
Chris Lattner
sabre at nondot.org
Fri Jan 12 10:37:45 PST 2007
Changes in directory llvm/tools/llvm2cpp:
CppWriter.cpp updated: 1.32 -> 1.33
---
Log message:
unbreak i1 constants with the cpp writer, eliminate special case.
---
Diffs of the changes: (+2 -6)
CppWriter.cpp | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
Index: llvm/tools/llvm2cpp/CppWriter.cpp
diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.32 llvm/tools/llvm2cpp/CppWriter.cpp:1.33
--- llvm/tools/llvm2cpp/CppWriter.cpp:1.32 Fri Jan 12 01:05:14 2007
+++ llvm/tools/llvm2cpp/CppWriter.cpp Fri Jan 12 12:37:29 2007
@@ -666,12 +666,8 @@
return;
}
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
- if (CI->getType() == Type::Int1Ty)
- Out << "ConstantInt* " << constName << " = ConstantInt::get("
- << (CI->getZExtValue() ? "true" : "false") << ");";
- else
- Out << "ConstantInt* " << constName << " = ConstantInt::get("
- << typeName << ", " << CI->getZExtValue() << ");";
+ Out << "ConstantInt* " << constName << " = ConstantInt::get("
+ << typeName << ", " << CI->getZExtValue() << ");";
} else if (isa<ConstantAggregateZero>(CV)) {
Out << "ConstantAggregateZero* " << constName
<< " = ConstantAggregateZero::get(" << typeName << ");";
More information about the llvm-commits
mailing list