projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33ce777
)
simplify code
author
Chris Lattner
<sabre@nondot.org>
Thu, 28 Sep 2006 23:24:48 +0000
(23:24 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 28 Sep 2006 23:24:48 +0000
(23:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30661
91177308
-0d34-0410-b5e6-
96231b3b80d8
tools/llvm2cpp/CppWriter.cpp
patch
|
blob
|
history
diff --git
a/tools/llvm2cpp/CppWriter.cpp
b/tools/llvm2cpp/CppWriter.cpp
index 66ed5b257c72e5bc98545169e78d25bce275d96b..85c1ec78534c110f22bf28ce885e723226e0d105 100644
(file)
--- 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() << ");";