diff options
author | Anders Carlsson <andersca@mac.com> | 2010-03-29 03:38:52 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-03-29 03:38:52 +0000 |
commit | a7cde3bb62eccc087821ee91c4ee4f6fd9a76b44 (patch) | |
tree | 79677d8eec2f41d96d7ac8e57b2a5251962ef798 /lib/CodeGen/CGVtable.h | |
parent | d18b4de53d1fd8b16cd48ea207a5ca7bb9562e82 (diff) |
More vtable work - it's not possible to use the new vtable code for everything by setting a flag inside CGVtable.cpp. My plan is to run some tests and bootstrap and once that's done flip the bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.h')
-rw-r--r-- | lib/CodeGen/CGVtable.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/CGVtable.h b/lib/CodeGen/CGVtable.h index 6dd37a4902..6a37eb26d1 100644 --- a/lib/CodeGen/CGVtable.h +++ b/lib/CodeGen/CGVtable.h @@ -292,6 +292,13 @@ private: return VTableLayoutMap.lookup(RD)[0]; } + const uint64_t *getVTableComponentsData(const CXXRecordDecl *RD) const { + assert(VTableLayoutMap.count(RD) && "No vtable layout for this class!"); + + uint64_t *Components = VTableLayoutMap.lookup(RD); + return &Components[1]; + } + typedef llvm::DenseMap<ClassPairTy, uint64_t> SubVTTIndiciesMapTy; /// SubVTTIndicies - Contains indices into the various sub-VTTs. @@ -380,6 +387,11 @@ public: /// GetAddrOfVTable - Get the address of the vtable for the given record decl. llvm::Constant *GetAddrOfVTable(const CXXRecordDecl *RD); + /// EmitVTableDefinition - Emit the definition of the given vtable. + void EmitVTableDefinition(llvm::GlobalVariable *VTable, + llvm::GlobalVariable::LinkageTypes Linkage, + const CXXRecordDecl *RD); + /// GenerateConstructionVTable - Generate a construction vtable for the given /// base subobject. llvm::GlobalVariable * |