aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-11-12 20:47:57 +0000
committerMike Stump <mrs@apple.com>2009-11-12 20:47:57 +0000
commit9840c70c34fbe3c8c7ca8b3950447bade915139a (patch)
tree678b03bb60dc8128e3a5c664bb3f31e37199a54c /lib/CodeGen/CodeGenModule.h
parentb0069eebb604114d5c9d37d0856fc39d1dfffd6d (diff)
Fix the offset calculations for non-virtual bases with overrides.
Refine the VTT entries for virtual bases to refer to the complete object's vtable instead of constructor vtables. Refine the AddressPoint calculations for VTT entries for virtual bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 749c8f5403..6fe6cf5584 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -250,9 +250,13 @@ public:
llvm::Constant *GetAddrOfFunction(GlobalDecl GD,
const llvm::Type *Ty = 0);
- /// GenerateVtable - Generate the vtable for the given type.
- llvm::Constant *GenerateVtable(const CXXRecordDecl *RD,
- const CXXRecordDecl *Class=0,
+ /// GenerateVtable - Generate the vtable for the given type. LayoutClass is
+ /// the class to use for the virtual base layout information. For
+ /// non-construction vtables, this is always the same as RD. Offset is the
+ /// offset in bits for the RD object in the LayoutClass, if we're generating a
+ /// construction vtable, otherwise 0.
+ llvm::Constant *GenerateVtable(const CXXRecordDecl *LayoutClass,
+ const CXXRecordDecl *RD,
uint64_t Offset=0);
/// GenerateVTT - Generate the VTT for the given type.
@@ -269,6 +273,10 @@ public:
int64_t nv_t, int64_t v_t,
int64_t nv_r, int64_t v_r);
+ typedef std::pair<const CXXRecordDecl *, uint64_t> CtorVtable_t;
+ llvm::DenseMap<const CXXRecordDecl *, llvm::DenseMap<CtorVtable_t,
+ int64_t>*> AddressPoints;
+
/// GetCXXBaseClassOffset - Returns the offset from a derived class to its
/// base class. Returns null if the offset is 0.
llvm::Constant *GetCXXBaseClassOffset(const CXXRecordDecl *ClassDecl,