forked from OSchip/llvm-project
[IR] Avoid use of PointerType::getElementType() in one of the CallBrInst constructors.
We already have the FunctionType we can call getReturnType on. I think this was due to a bad rebase of the CallBr patch while it was in development when CallInst and InvokeInst were updated.
This commit is contained in:
parent
d5fc36bbda
commit
462a67fadd
|
@ -4142,13 +4142,9 @@ CallBrInst::CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest,
|
|||
ArrayRef<Value *> Args,
|
||||
ArrayRef<OperandBundleDef> Bundles, int NumOperands,
|
||||
const Twine &NameStr, BasicBlock *InsertAtEnd)
|
||||
: CallBase(
|
||||
cast<FunctionType>(
|
||||
cast<PointerType>(Func->getType())->getElementType())
|
||||
->getReturnType(),
|
||||
Instruction::CallBr,
|
||||
OperandTraits<CallBase>::op_end(this) - NumOperands, NumOperands,
|
||||
InsertAtEnd) {
|
||||
: CallBase(Ty->getReturnType(), Instruction::CallBr,
|
||||
OperandTraits<CallBase>::op_end(this) - NumOperands, NumOperands,
|
||||
InsertAtEnd) {
|
||||
init(Ty, Func, DefaultDest, IndirectDests, Args, Bundles, NameStr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue