Narrow down the type of CallInst::getFunctionType to a FunctionType
[oota-llvm.git] / include / llvm / IR / Instructions.h
index 1f2ca301d24c2a71c478caca71346aa0626da7fc..ddb441b6e5d4f3ab4092e307c228e5c17c1fa0bb 100644 (file)
@@ -1337,8 +1337,9 @@ public:
 
   ~CallInst() override;
 
-  Type *getFunctionType() const {
-    return cast<PointerType>(getCalledValue()->getType())->getElementType();
+  FunctionType *getFunctionType() const {
+    return cast<FunctionType>(
+        cast<PointerType>(getCalledValue()->getType())->getElementType());
   }
 
   // Note that 'musttail' implies 'tail'.