[cfe-commits] r90522 - /cfe/trunk/lib/CodeGen/CGVtable.cpp

Anders Carlsson andersca at mac.com
Thu Dec 3 18:14:13 PST 2009


Author: andersca
Date: Thu Dec  3 20:14:12 2009
New Revision: 90522

URL: http://llvm.org/viewvc/llvm-project?rev=90522&view=rev
Log:
Remove the GlobalDecl from the Thunk as well.

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

Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=90522&r1=90521&r2=90522&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Thu Dec  3 20:14:12 2009
@@ -118,11 +118,9 @@
   struct Thunk {
     Thunk() { }
     
-    Thunk(GlobalDecl GD, const ThunkAdjustment &Adjustment)
-      : GD(GD), Adjustment(Adjustment) { }
+    Thunk(const ThunkAdjustment &Adjustment)
+      : Adjustment(Adjustment) { }
     
-    GlobalDecl GD;
-
     /// Adjustment - The thunk adjustment.
     ThunkAdjustment Adjustment;
   };
@@ -351,9 +349,9 @@
     for (ThunksMapTy::const_iterator i = Thunks.begin(), e = Thunks.end();
          i != e; ++i) {
       uint64_t Index = i->first;
+      GlobalDecl GD = Methods[Index];
       const Thunk& Thunk = i->second;
 
-      GlobalDecl GD = Thunk.GD;
       const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
       assert(!MD->isPure() && "Can't thunk pure virtual methods!");
 
@@ -907,7 +905,7 @@
                                        VirtualAdjustment);
 
         if (!isPure && !ThisAdjustment.isEmpty())
-          Thunks[i] = Thunk(GD, ThisAdjustment);
+          Thunks[i] = Thunk(ThisAdjustment);
         return true;
       }
 
@@ -918,7 +916,7 @@
         ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0);
         
         if (!isPure)
-          Thunks[i] = Thunk(GD, ThisAdjustment);
+          Thunks[i] = Thunk(ThisAdjustment);
       }
       return true;
     }





More information about the cfe-commits mailing list