summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2013-10-09 18:16:58 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2013-10-09 18:16:58 +0000
commit5bd0d44c8da50f3a629c90fee92ce5cf1e31c9ff (patch)
tree7e57ad2e294edd4379c6788676ef669e12104b06 /lib/CodeGen/CGClass.cpp
parent45d3950e373412f395413c81a0310e8090508608 (diff)
downloadclang-5bd0d44c8da50f3a629c90fee92ce5cf1e31c9ff.tar.gz
clang-5bd0d44c8da50f3a629c90fee92ce5cf1e31c9ff.tar.bz2
clang-5bd0d44c8da50f3a629c90fee92ce5cf1e31c9ff.tar.xz
Initialize vtorDisp in class constructors and destructors
Reviewed at http://llvm-reviews.chandlerc.com/D1867 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 137d793c11..91f42e2f57 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -1992,6 +1992,9 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) {
/*NearestVBase=*/0,
/*OffsetFromNearestVBase=*/CharUnits::Zero(),
/*BaseIsNonVirtualPrimaryBase=*/false, RD, VBases);
+
+ if (RD->getNumVBases())
+ CGM.getCXXABI().initializeHiddenVirtualInheritanceMembers(*this, RD);
}
llvm::Value *CodeGenFunction::GetVTablePtr(llvm::Value *This,