[cfe-commits] r99251 - in /cfe/trunk/lib/CodeGen: CGVtable.cpp CGVtable.h CodeGenModule.cpp

Anders Carlsson andersca at mac.com
Mon Mar 22 21:15:00 PDT 2010


Author: andersca
Date: Mon Mar 22 23:15:00 2010
New Revision: 99251

URL: http://llvm.org/viewvc/llvm-project?rev=99251&view=rev
Log:
Rename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it emit thunks as well.

Modified:
    cfe/trunk/lib/CodeGen/CGVtable.cpp
    cfe/trunk/lib/CodeGen/CGVtable.h
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=99251&r1=99250&r2=99251&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Mon Mar 22 23:15:00 2010
@@ -3784,7 +3784,7 @@
   return Vtable;
 }
 
-void CodeGenVTables::MaybeEmitVtable(GlobalDecl GD) {
+void CodeGenVTables::EmitVTableRelatedData(GlobalDecl GD) {
   const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
   const CXXRecordDecl *RD = MD->getParent();
 

Modified: cfe/trunk/lib/CodeGen/CGVtable.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.h?rev=99251&r1=99250&r2=99251&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.h (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.h Mon Mar 22 23:15:00 2010
@@ -238,7 +238,9 @@
   
   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

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=99251&r1=99250&r2=99251&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Mar 22 23:15:00 2010
@@ -715,7 +715,7 @@
                                  "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)) {





More information about the cfe-commits mailing list