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