From d99bff4ef6bc8137ad0cc4fc01f1860867377162 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 12 Jan 2007 18:37:29 +0000 Subject: unbreak i1 constants with the cpp writer, eliminate special case. llvm-svn: 33133 --- llvm/tools/llvm2cpp/CppWriter.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'llvm/tools/llvm2cpp/CppWriter.cpp') 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(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 << ");"; -- cgit v1.2.3