diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-15 02:03:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-15 02:03:16 +0000 |
commit | c69c6c4db221b3a6ce08c0b4ebc022319fb50895 (patch) | |
tree | c90744df93cfe5232d3e81fdf3c98f92c15401fd /llvm/lib | |
parent | b02536cadfedb672f93190e3880ba86c6a7c1330 (diff) | |
download | bcm5719-llvm-c69c6c4db221b3a6ce08c0b4ebc022319fb50895.tar.gz bcm5719-llvm-c69c6c4db221b3a6ce08c0b4ebc022319fb50895.zip |
eliminate calls to Type::isInteger, preferring isIntegral instead.
llvm-svn: 33222
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/IntrinsicLowering.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp index 72a1d1485b4..beb5ea21c78 100644 --- a/llvm/lib/CodeGen/IntrinsicLowering.cpp +++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp @@ -107,7 +107,7 @@ void IntrinsicLowering::AddPrototypes(Module &M) { /// LowerBSWAP - Emit the code to lower bswap of V before the specified /// instruction IP. static Value *LowerBSWAP(Value *V, Instruction *IP) { - assert(V->getType()->isInteger() && "Can't bswap a non-integer type!"); + assert(V->getType()->isIntegral() && "Can't bswap a non-integer type!"); unsigned BitSize = V->getType()->getPrimitiveSizeInBits(); @@ -193,7 +193,7 @@ static Value *LowerBSWAP(Value *V, Instruction *IP) { /// LowerCTPOP - Emit the code to lower ctpop of V before the specified /// instruction IP. static Value *LowerCTPOP(Value *V, Instruction *IP) { - assert(V->getType()->isInteger() && "Can't ctpop a non-integer type!"); + assert(V->getType()->isIntegral() && "Can't ctpop a non-integer type!"); static const uint64_t MaskValues[6] = { 0x5555555555555555ULL, 0x3333333333333333ULL, diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp index 681fb67b922..3cba14b3e72 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -1541,14 +1541,14 @@ GenericValue Interpreter::executeBitCastInst(Value *SrcVal, const Type *DstTy, if (isa<PointerType>(DstTy)) { assert(isa<PointerType>(SrcTy) && "Invalid BitCast"); Dest.PointerVal = Src.PointerVal; - } else if (DstTy->isInteger()) { + } else if (DstTy->isIntegral()) { const IntegerType *DITy = cast<IntegerType>(DstTy); unsigned DBitWidth = DITy->getBitWidth(); if (SrcTy == Type::FloatTy) { Dest.Int32Val = FloatToBits(Src.FloatVal); } else if (SrcTy == Type::DoubleTy) { Dest.Int64Val = DoubleToBits(Src.DoubleVal); - } else if (SrcTy->isInteger()) { + } else if (SrcTy->isIntegral()) { const IntegerType *SITy = cast<IntegerType>(SrcTy); unsigned SBitWidth = SITy->getBitWidth(); assert(SBitWidth <= 64 && "Integer types > 64 bits not supported"); @@ -1566,12 +1566,12 @@ GenericValue Interpreter::executeBitCastInst(Value *SrcVal, const Type *DstTy, } else assert(0 && "Invalid BitCast"); } else if (DstTy == Type::FloatTy) { - if (SrcTy->isInteger()) + if (SrcTy->isIntegral()) Dest.FloatVal = BitsToFloat(Src.Int32Val); else Dest.FloatVal = Src.FloatVal; } else if (DstTy == Type::DoubleTy) { - if (SrcTy->isInteger()) + if (SrcTy->isIntegral()) Dest.DoubleVal = BitsToDouble(Src.Int64Val); else Dest.DoubleVal = Src.DoubleVal; |