diff options
author | Anders Carlsson <andersca@mac.com> | 2010-03-23 04:15:00 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-03-23 04:15:00 +0000 |
commit | 13189d0a184cac98b00ad7d7ee93481633af46cc (patch) | |
tree | dc45c00a8e412ae2b1591ed188293bff31936a0c | |
parent | af4403545a50a60d208e6fcae057308d576a92e0 (diff) |
Rename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it emit thunks as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99251 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/CGVtable.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 2 |
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)) { |