diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index 2913a820c4c0..e9d3d2169be0 100644 --- a/llvm/include/llvm/IR/Instructions.h +++ b/llvm/include/llvm/IR/Instructions.h @@ -4142,13 +4142,9 @@ CallBrInst::CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest, ArrayRef Args, ArrayRef Bundles, int NumOperands, const Twine &NameStr, BasicBlock *InsertAtEnd) - : CallBase( - cast( - cast(Func->getType())->getElementType()) - ->getReturnType(), - Instruction::CallBr, - OperandTraits::op_end(this) - NumOperands, NumOperands, - InsertAtEnd) { + : CallBase(Ty->getReturnType(), Instruction::CallBr, + OperandTraits::op_end(this) - NumOperands, NumOperands, + InsertAtEnd) { init(Ty, Func, DefaultDest, IndirectDests, Args, Bundles, NameStr); }