diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm2cpp/CppWriter.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp index 82997ce..845fad4 100644 --- a/tools/llvm2cpp/CppWriter.cpp +++ b/tools/llvm2cpp/CppWriter.cpp @@ -666,12 +666,8 @@ void CppWriter::printConstant(const Constant *CV) { 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 << ");"; |