aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVtable.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-03-29 02:08:26 +0000
committerAnders Carlsson <andersca@mac.com>2010-03-29 02:08:26 +0000
commit64c9eca97e06d80960d8782769661904e261ac29 (patch)
tree0fe88a61cb18f60c5b3f93614f359df8740b7d64 /lib/CodeGen/CGVtable.cpp
parent276701f38d383e9bf036b6b4af60f7e18ec4e525 (diff)
Cleanup, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r--lib/CodeGen/CGVtable.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp
index 592f782edc..3322510815 100644
--- a/lib/CodeGen/CGVtable.cpp
+++ b/lib/CodeGen/CGVtable.cpp
@@ -3609,6 +3609,19 @@ int64_t CodeGenVTables::getVirtualBaseOffsetOffset(const CXXRecordDecl *RD,
return I->second;
}
+uint64_t
+CodeGenVTables::getAddressPoint(BaseSubobject Base, const CXXRecordDecl *RD) {
+ const CodeGenVTables::AddrSubMap_t& AddressPoints = getAddressPoints(RD);
+
+ uint64_t AddressPoint =
+ AddressPoints.lookup(std::make_pair(Base.getBase(),
+ Base.getBaseOffset()));
+
+ assert(AddressPoint && "Address point must not be zero!");
+
+ return AddressPoint;
+}
+
const CodeGenVTables::AddrSubMap_t &
CodeGenVTables::getAddressPoints(const CXXRecordDecl *RD) {
if (!OldAddressPoints[RD]) {