diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2013-02-18 18:49:44 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2013-02-18 18:49:44 +0000 |
commit | 39c0ad7515d0d44d1445375ecea533aa3121cf6e (patch) | |
tree | 377b98b17b2509f5ac0d7a10a5870e9186a965c6 | |
parent | 774c2479adebe3d498da985640f542ad1b508ee0 (diff) | |
download | bcm5719-llvm-39c0ad7515d0d44d1445375ecea533aa3121cf6e.tar.gz bcm5719-llvm-39c0ad7515d0d44d1445375ecea533aa3121cf6e.zip |
Use llvm::cast instead of reinterpret_cast.
Also, GetElementPtrInst::getType() method returns SequentialType now, instead of
PointerType. There wasn't any issue yet, so no testcase attached.
llvm-svn: 175452
-rw-r--r-- | llvm/include/llvm/IR/Instructions.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index 324a646bc13..1ae8850cbcc 100644 --- a/llvm/include/llvm/IR/Instructions.h +++ b/llvm/include/llvm/IR/Instructions.h @@ -91,7 +91,7 @@ public: /// getType - Overload to return most specific pointer type /// PointerType *getType() const { - return reinterpret_cast<PointerType*>(Instruction::getType()); + return cast<PointerType>(Instruction::getType()); } /// getAllocatedType - Return the type that is being allocated by the @@ -762,9 +762,9 @@ public: /// Transparently provide more efficient getOperand methods. DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - // getType - Overload to return most specific pointer type... - PointerType *getType() const { - return reinterpret_cast<PointerType*>(Instruction::getType()); + // getType - Overload to return most specific sequential type. + SequentialType *getType() const { + return cast<SequentialType>(Instruction::getType()); } /// \brief Returns the address space of this instruction's pointer type. @@ -1570,7 +1570,7 @@ public: const Value *getIndexOperand() const { return Op<1>(); } VectorType *getVectorOperandType() const { - return reinterpret_cast<VectorType*>(getVectorOperand()->getType()); + return cast<VectorType>(getVectorOperand()->getType()); } @@ -1629,7 +1629,7 @@ public: /// getType - Overload to return most specific vector type. /// VectorType *getType() const { - return reinterpret_cast<VectorType*>(Instruction::getType()); + return cast<VectorType>(Instruction::getType()); } /// Transparently provide more efficient getOperand methods. @@ -1681,14 +1681,14 @@ public: /// getType - Overload to return most specific vector type. /// VectorType *getType() const { - return reinterpret_cast<VectorType*>(Instruction::getType()); + return cast<VectorType>(Instruction::getType()); } /// Transparently provide more efficient getOperand methods. DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); Constant *getMask() const { - return reinterpret_cast<Constant*>(getOperand(2)); + return cast<Constant>(getOperand(2)); } /// getMaskValue - Return the index from the shuffle mask for the specified |