diff options
author | Anders Carlsson <andersca@mac.com> | 2010-01-17 17:10:44 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-01-17 17:10:44 +0000 |
commit | 42f1376f3594fcd43dabd477dddb568d2667e8bf (patch) | |
tree | b060b9fecb625a3c3d4fb5df135e5d68be778494 /clang/lib/CodeGen | |
parent | 4d128a238794c496e21b4ea7b0a1175f5b3134a7 (diff) | |
download | bcm5719-llvm-42f1376f3594fcd43dabd477dddb568d2667e8bf.tar.gz bcm5719-llvm-42f1376f3594fcd43dabd477dddb568d2667e8bf.zip |
Get the ctor vtable address points directly from the VTT builder.
llvm-svn: 93681
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGVtable.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp index ae900d6ae70..27cb6612928 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/lib/CodeGen/CGVtable.cpp @@ -1266,9 +1266,19 @@ class VTTBuilder { const CXXRecordDecl *VtableClass, const CXXRecordDecl *RD, uint64_t Offset) { - int64_t AddressPoint = - (*AddressPoints[VtableClass])[std::make_pair(RD, Offset)]; + uint64_t AddressPoint; + if (VtableClass != Class) { + // We have a ctor vtable, look for the address point in the ctor vtable + // address points. + AddressPoint = + CtorVtableAddressPoints[std::make_pair(VtableClass, + BaseSubobject(RD, Offset))]; + } else { + AddressPoint = + (*AddressPoints[VtableClass])[std::make_pair(RD, Offset)]; + } + // FIXME: We can never have 0 address point. Do this for now so gepping // retains the same structure. Later we'll just assert. if (AddressPoint == 0) |