aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTypes.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-11-24 05:08:52 +0000
committerAnders Carlsson <andersca@mac.com>2009-11-24 05:08:52 +0000
commitecf282b0486873309fd58ec4d3ec0dbf983b33d4 (patch)
tree815a9003c3f355ff6ee8907cb54cdb4628bb1073 /lib/CodeGen/CodeGenTypes.h
parentd02174c1f22974a1f0e2334e393f8345c6d11302 (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/CodeGenTypes.h')
-rw-r--r--lib/CodeGen/CodeGenTypes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h
index f447549f66..d4adebecde 100644
--- a/lib/CodeGen/CodeGenTypes.h
+++ b/lib/CodeGen/CodeGenTypes.h
@@ -173,6 +173,12 @@ public:
const llvm::FunctionType *GetFunctionType(const CGFunctionInfo &Info,
bool IsVariadic);
+
+ /// GetFunctionTypeForVtable - Get the LLVM function type for use in a vtable,
+ /// given a CXXMethodDecl. If the method to has an incomplete return type,
+ /// and/or incomplete argument types, this will return the opaque type.
+ const llvm::Type *GetFunctionTypeForVtable(const CXXMethodDecl *MD);
+
const CGRecordLayout &getCGRecordLayout(const TagDecl*) const;
/// getLLVMFieldNo - Return llvm::StructType element number