diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index 1f2ca301d24c..ddb441b6e5d4 100644 --- a/llvm/include/llvm/IR/Instructions.h +++ b/llvm/include/llvm/IR/Instructions.h @@ -1337,8 +1337,9 @@ public: ~CallInst() override; - Type *getFunctionType() const { - return cast(getCalledValue()->getType())->getElementType(); + FunctionType *getFunctionType() const { + return cast( + cast(getCalledValue()->getType())->getElementType()); } // Note that 'musttail' implies 'tail'.