diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-12 18:37:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-12 18:37:29 +0000 |
commit | d99bff4ef6bc8137ad0cc4fc01f1860867377162 (patch) | |
tree | 8f365ae39aa0fb2b2186e4baecadb1c643646401 /llvm/tools/llvm2cpp/CppWriter.cpp | |
parent | e3721e30024e6719c92f4744a265325084d7ef40 (diff) | |
download | bcm5719-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.cpp | 8 |
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 << ");"; |