From 13189d0a184cac98b00ad7d7ee93481633af46cc Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Tue, 23 Mar 2010 04:15:00 +0000 Subject: [PATCH] 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 --- lib/CodeGen/CGVtable.cpp | 2 +- lib/CodeGen/CGVtable.h | 4 +++- 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(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(D)) { - getVTables().MaybeEmitVtable(GD); + getVTables().EmitVTableRelatedData(GD); if (MD->isVirtual() && MD->isOutOfLine() && (!isa(D) || GD.getDtorType() != Dtor_Base)) { if (isa(D)) { -- 2.40.0