diff options
author | Anders Carlsson <andersca@mac.com> | 2009-11-24 05:08:52 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-11-24 05:08:52 +0000 |
commit | ecf282b0486873309fd58ec4d3ec0dbf983b33d4 (patch) | |
tree | 815a9003c3f355ff6ee8907cb54cdb4628bb1073 /lib/CodeGen/CGVtable.cpp | |
parent | d02174c1f22974a1f0e2334e393f8345c6d11302 (diff) |
It is common for vtables to contain pointers to functions that have either incomplete return types or incomplete argument types.
Handle this by returning the llvm::OpaqueType for those cases, which CodeGenModule::GetOrCreateLLVMFunction knows about, and treats as being an "incomplete function".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index f68dbe910f..0c36ef492b 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -367,10 +367,7 @@ public: if (const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(MD)) return wrap(CGM.GetAddrOfCXXDestructor(Dtor, GD.getDtorType())); - const FunctionProtoType *FPT = MD->getType()->getAs<FunctionProtoType>(); - const llvm::Type *Ty = - CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(MD), - FPT->isVariadic()); + const llvm::Type *Ty = CGM.getTypes().GetFunctionTypeForVtable(MD); return wrap(CGM.GetAddrOfFunction(MD, Ty)); } |