diff options
Diffstat (limited to 'tools/llvm2cpp')
-rw-r--r-- | tools/llvm2cpp/CppWriter.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp index 66ed5b257c..85c1ec7853 100644 --- a/tools/llvm2cpp/CppWriter.cpp +++ b/tools/llvm2cpp/CppWriter.cpp @@ -677,8 +677,7 @@ void CppWriter::printConstant(const Constant *CV) { } if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) { Out << "ConstantBool* " << constName << " = ConstantBool::get(" - << (CB == ConstantBool::True ? "true" : "false") - << ");"; + << (CB->getValue() ? "true" : "false") << ");"; } else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV)) { Out << "ConstantSInt* " << constName << " = ConstantSInt::get(" << typeName << ", " << CI->getValue() << ");"; |