Also, GetElementPtrInst::getType() method returns SequentialType now, instead of
PointerType. There wasn't any issue yet, so no testcase attached.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175452
91177308-0d34-0410-b5e6-
96231b3b80d8
/// getType - Overload to return most specific pointer type
///
PointerType *getType() const {
/// 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
}
/// getAllocatedType - Return the type that is being allocated by the
/// Transparently provide more efficient getOperand methods.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
/// 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.
}
/// \brief Returns the address space of this instruction's pointer type.
const Value *getIndexOperand() const { return Op<1>(); }
VectorType *getVectorOperandType() const {
const Value *getIndexOperand() const { return Op<1>(); }
VectorType *getVectorOperandType() const {
- return reinterpret_cast<VectorType*>(getVectorOperand()->getType());
+ return cast<VectorType>(getVectorOperand()->getType());
/// getType - Overload to return most specific vector type.
///
VectorType *getType() const {
/// 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.
}
/// Transparently provide more efficient getOperand methods.
/// getType - Overload to return most specific vector type.
///
VectorType *getType() const {
/// 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 {
}
/// 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
}
/// getMaskValue - Return the index from the shuffle mask for the specified