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 | f6e7bb4a5ef6209b76a696d9afa7ccb85e17d30e (patch) | |
tree | bc4ba17445d08715b43ce252464486d94af730a2 /tools | |
parent | e9d4fa7a92e2f54fa7a67c506a3d97c549b0d0f3 (diff) | |
download | external_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.cpp | 8 |
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 << ");"; |