diff options
author | James Y Knight <jyknight@google.com> | 2019-02-07 01:15:41 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2019-02-07 01:15:41 +0000 |
commit | 6d763e31d26e7757e5434188a2125763e59cd9e1 (patch) | |
tree | 04b6f77c44ad1e8207901c2f6dff531788570378 /lib/CodeGen/CGCall.h | |
parent | 8e92458b496e7896e9a9caf0cf3d605adb3978bd (diff) |
[opaque pointer types] Make EmitCall pass Function Types to
CreateCall/Invoke.
Also, remove the getFunctionType() function from CGCallee, since it
accesses the pointee type of the value. The only use was in EmitCall,
so just inline it into the debug assertion.
This is the last of the changes for Call and Invoke in clang.
Differential Revision: https://reviews.llvm.org/D57804
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.h')
-rw-r--r-- | lib/CodeGen/CGCall.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/CGCall.h b/lib/CodeGen/CGCall.h index 27c1bcae7e..cc11ded704 100644 --- a/lib/CodeGen/CGCall.h +++ b/lib/CodeGen/CGCall.h @@ -204,12 +204,9 @@ public: assert(isVirtual()); return VirtualInfo.Addr; } - - llvm::FunctionType *getFunctionType() const { - if (isVirtual()) - return VirtualInfo.FTy; - return cast<llvm::FunctionType>( - getFunctionPointer()->getType()->getPointerElementType()); + llvm::FunctionType *getVirtualFunctionType() const { + assert(isVirtual()); + return VirtualInfo.FTy; } /// If this is a delayed callee computation of some sort, prepare |