diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-11 18:21:29 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-11 18:21:29 +0000 |
commit | 542964f55b2dce5703c9dd88496fde4f7ebf89b6 (patch) | |
tree | 07d5e88789ee8f5f61159e1ec2def506545fe52a /llvm/tools/llvm2cpp | |
parent | bd23db9968ac7583431836ffcf9957f8e38c1aea (diff) | |
download | bcm5719-llvm-542964f55b2dce5703c9dd88496fde4f7ebf89b6.tar.gz bcm5719-llvm-542964f55b2dce5703c9dd88496fde4f7ebf89b6.zip |
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
Diffstat (limited to 'llvm/tools/llvm2cpp')
-rw-r--r-- | llvm/tools/llvm2cpp/CppWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm2cpp/CppWriter.cpp b/llvm/tools/llvm2cpp/CppWriter.cpp index 313db9b7c1d..4e6fe6b3329 100644 --- a/llvm/tools/llvm2cpp/CppWriter.cpp +++ b/llvm/tools/llvm2cpp/CppWriter.cpp @@ -166,7 +166,7 @@ getTypePrefix(const Type* Ty ) { const char* prefix; switch (Ty->getTypeID()) { case Type::VoidTyID: prefix = "void_"; break; - case Type::BoolTyID: prefix = "bool_"; break; + case Type::Int1TyID: prefix = "bool_"; break; case Type::Int8TyID: prefix = "int8_"; break; case Type::Int16TyID: prefix = "int16_"; break; case Type::Int32TyID: prefix = "int32_"; break; @@ -316,7 +316,7 @@ CppWriter::getCppName(const Type* Ty) if (Ty->isPrimitiveType()) { switch (Ty->getTypeID()) { case Type::VoidTyID: return "Type::VoidTy"; - case Type::BoolTyID: return "Type::BoolTy"; + case Type::Int1TyID: return "Type::Int1Ty"; case Type::Int8TyID: return "Type::Int8Ty"; case Type::Int16TyID: return "Type::Int16Ty"; case Type::Int32TyID: return "Type::Int32Ty"; @@ -669,7 +669,7 @@ void CppWriter::printConstant(const Constant *CV) { return; } if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) { - if (CI->getType() == Type::BoolTy) + if (CI->getType() == Type::Int1Ty) Out << "ConstantInt* " << constName << " = ConstantInt::get(" << (CI->getBoolValue() ? "true" : "false") << ");"; else |