From: Chris Lattner Date: Fri, 12 Jan 2007 18:37:29 +0000 (+0000) Subject: unbreak i1 constants with the cpp writer, eliminate special case. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f6e7bb4a5ef6209b76a696d9afa7ccb85e17d30e;p=oota-llvm.git unbreak i1 constants with the cpp writer, eliminate special case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33133 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp index 82997cebcc5..845fad47b02 100644 --- a/tools/llvm2cpp/CppWriter.cpp +++ b/tools/llvm2cpp/CppWriter.cpp @@ -666,12 +666,8 @@ void CppWriter::printConstant(const Constant *CV) { return; } if (const ConstantInt *CI = dyn_cast(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(CV)) { Out << "ConstantAggregateZero* " << constName << " = ConstantAggregateZero::get(" << typeName << ");";