diff options
author | Mike Stump <mrs@apple.com> | 2009-11-10 07:44:33 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-11-10 07:44:33 +0000 |
commit | 380dd759b33fd059b1aa7dbd85f8e66ca32f7bdc (patch) | |
tree | 27f20d2450d139bc1fa37d4f20813b524f1c24a4 /lib/CodeGen/CGVtable.h | |
parent | d7be78a0524251c30329359c9d92485c6d7ac424 (diff) |
Add vtable caching to prevent multiple vtables for the same class from
being generated.
Add the most derived vtable pointer to the VTT.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86671 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.h')
-rw-r--r-- | lib/CodeGen/CGVtable.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGVtable.h b/lib/CodeGen/CGVtable.h index 69fb1f1005..cdba953718 100644 --- a/lib/CodeGen/CGVtable.h +++ b/lib/CodeGen/CGVtable.h @@ -38,6 +38,8 @@ class CGVtableInfo { /// offsets for virtual bases of a class are stored. typedef llvm::DenseMap<ClassPairTy, int64_t> VirtualBaseClassIndiciesTy; VirtualBaseClassIndiciesTy VirtualBaseClassIndicies; + + llvm::DenseMap<const CXXRecordDecl *, llvm::Constant *> Vtables; public: CGVtableInfo(CodeGenModule &CGM) : CGM(CGM) { } @@ -54,6 +56,8 @@ public: /// base. int64_t getVirtualBaseOffsetIndex(const CXXRecordDecl *RD, const CXXRecordDecl *VBase); + + llvm::Constant *getVtable(const CXXRecordDecl *RD); }; } |