Narrow down the type of CallInst::getFunctionType to a FunctionType
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 17 Apr 2015 06:40:11 +0000 (06:40 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 17 Apr 2015 06:40:11 +0000 (06:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235159 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/Instructions.h

index 1f2ca30..ddb441b 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'.