summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm2cpp/CppWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-12 18:37:29 +0000
committerChris Lattner <sabre@nondot.org>2007-01-12 18:37:29 +0000
commitd99bff4ef6bc8137ad0cc4fc01f1860867377162 (patch)
tree8f365ae39aa0fb2b2186e4baecadb1c643646401 /llvm/tools/llvm2cpp/CppWriter.cpp
parente3721e30024e6719c92f4744a265325084d7ef40 (diff)
downloadbcm5719-llvm-d99bff4ef6bc8137ad0cc4fc01f1860867377162.tar.gz
bcm5719-llvm-d99bff4ef6bc8137ad0cc4fc01f1860867377162.zip
unbreak i1 constants with the cpp writer, eliminate special case.
llvm-svn: 33133
Diffstat (limited to 'llvm/tools/llvm2cpp/CppWriter.cpp')
-rw-r--r--llvm/tools/llvm2cpp/CppWriter.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/tools/llvm2cpp/CppWriter.cpp b/llvm/tools/llvm2cpp/CppWriter.cpp
index 82997cebcc5..845fad47b02 100644
--- a/llvm/tools/llvm2cpp/CppWriter.cpp
+++ b/llvm/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 << ");";
OpenPOWER on IntegriCloud