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 | 4fe16d607d11e29d742208894909733f5ad01f8f (patch) | |
tree | a669ba57373e87d31c3af6f301fe4a61f773f4b3 /lib/Target/CBackend/CBackend.cpp | |
parent | 34dceb47573b0aedd188b5e72bb848ba29a4960f (diff) |
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 9517134c88..f945036a74 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -369,7 +369,7 @@ CWriter::printPrimitiveType(std::ostream &Out, const Type *Ty, bool isSigned, assert(Ty->isPrimitiveType() && "Invalid type for printPrimitiveType"); switch (Ty->getTypeID()) { case Type::VoidTyID: return Out << "void " << NameSoFar; - case Type::BoolTyID: return Out << "bool " << NameSoFar; + case Type::Int1TyID: return Out << "bool " << NameSoFar; case Type::Int8TyID: return Out << (isSigned?"signed":"unsigned") << " char " << NameSoFar; case Type::Int16TyID: @@ -688,12 +688,12 @@ void CWriter::printConstant(Constant *CPV) { Out << "("; printCast(CE->getOpcode(), CE->getOperand(0)->getType(), CE->getType()); if (CE->getOpcode() == Instruction::SExt && - CE->getOperand(0)->getType() == Type::BoolTy) { + CE->getOperand(0)->getType() == Type::Int1Ty) { // Make sure we really sext from bool here by subtracting from 0 Out << "0-"; } printConstant(CE->getOperand(0)); - if (CE->getType() == Type::BoolTy && + if (CE->getType() == Type::Int1Ty && (CE->getOpcode() == Instruction::Trunc || CE->getOpcode() == Instruction::FPToUI || CE->getOpcode() == Instruction::FPToSI || @@ -828,7 +828,7 @@ void CWriter::printConstant(Constant *CPV) { if (ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) { const Type* Ty = CI->getType(); - if (Ty == Type::BoolTy) + if (Ty == Type::Int1Ty) Out << (CI->getBoolValue() ? '1' : '0') ; else { Out << "(("; @@ -2256,12 +2256,12 @@ void CWriter::visitCastInst(CastInst &I) { << getFloatBitCastField(I.getType()); } else { printCast(I.getOpcode(), SrcTy, DstTy); - if (I.getOpcode() == Instruction::SExt && SrcTy == Type::BoolTy) { + if (I.getOpcode() == Instruction::SExt && SrcTy == Type::Int1Ty) { // Make sure we really get a sext from bool by subtracing the bool from 0 Out << "0-"; } writeOperand(I.getOperand(0)); - if (DstTy == Type::BoolTy && + if (DstTy == Type::Int1Ty && (I.getOpcode() == Instruction::Trunc || I.getOpcode() == Instruction::FPToUI || I.getOpcode() == Instruction::FPToSI || |