aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGVtable.cpp2
-rw-r--r--lib/CodeGen/CGVtable.h4
-rw-r--r--lib/CodeGen/CodeGenModule.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp
index aea7d66620..49eea98243 100644
--- a/lib/CodeGen/CGVtable.cpp
+++ b/lib/CodeGen/CGVtable.cpp
@@ -3784,7 +3784,7 @@ llvm::GlobalVariable *CodeGenVTables::getVtable(const CXXRecordDecl *RD) {
return Vtable;
}
-void CodeGenVTables::MaybeEmitVtable(GlobalDecl GD) {
+void CodeGenVTables::EmitVTableRelatedData(GlobalDecl GD) {
const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
const CXXRecordDecl *RD = MD->getParent();
diff --git a/lib/CodeGen/CGVtable.h b/lib/CodeGen/CGVtable.h
index 8b5ccdd988..f3574987fa 100644
--- a/lib/CodeGen/CGVtable.h
+++ b/lib/CodeGen/CGVtable.h
@@ -238,7 +238,9 @@ public:
llvm::GlobalVariable *getVTT(const CXXRecordDecl *RD);
- void MaybeEmitVtable(GlobalDecl GD);
+ // EmitVTableRelatedData - Will emit any thunks that the global decl might
+ // have, as well as the vtable itself if the global decl is the key function.
+ void EmitVTableRelatedData(GlobalDecl GD);
/// GenerateClassData - Generate all the class data requires to be generated
/// upon definition of a KeyFunction. This includes the vtable, the
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 1450bdddac..50ac7a31fc 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -715,7 +715,7 @@ void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) {
"Generating code for declaration");
if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) {
- getVTables().MaybeEmitVtable(GD);
+ getVTables().EmitVTableRelatedData(GD);
if (MD->isVirtual() && MD->isOutOfLine() &&
(!isa<CXXDestructorDecl>(D) || GD.getDtorType() != Dtor_Base)) {
if (isa<CXXDestructorDecl>(D)) {