aboutsummaryrefslogtreecommitdiffstats
path: root/tools
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
commitf6e7bb4a5ef6209b76a696d9afa7ccb85e17d30e (patch)
treebc4ba17445d08715b43ce252464486d94af730a2 /tools
parente9d4fa7a92e2f54fa7a67c506a3d97c549b0d0f3 (diff)
downloadexternal_llvm-f6e7bb4a5ef6209b76a696d9afa7ccb85e17d30e.zip
external_llvm-f6e7bb4a5ef6209b76a696d9afa7ccb85e17d30e.tar.gz
external_llvm-f6e7bb4a5ef6209b76a696d9afa7ccb85e17d30e.tar.bz2
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
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm2cpp/CppWriter.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp
index 82997ce..845fad4 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<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 << ");";