]> granicus.if.org Git - clang/commitdiff
Be a bit more complete about accumulating SavedThisAdjustments.
authorEli Friedman <eli.friedman@gmail.com>
Sun, 6 Dec 2009 22:33:51 +0000 (22:33 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sun, 6 Dec 2009 22:33:51 +0000 (22:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90723 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index 857e661254b594e5483c9fed9698e5b1803c6670..6fda6a44046ae4feae1796a217f05434d0e1c573 100644 (file)
@@ -838,7 +838,6 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, bool MorallyVirtual,
 
       if (!isPure && !ThisAdjustment.isEmpty()) {
         ThisAdjustments[Index] = ThisAdjustment;
-        // FIXME: Might this end up inserting some false adjustments?
         SavedThisAdjustments.push_back(std::make_pair(std::make_pair(GD, OGD),
                                                       ThisAdjustment));
       }
@@ -851,8 +850,11 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, bool MorallyVirtual,
     if (NonVirtualAdjustment) {
       ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0);
       
-      if (!isPure)
+      if (!isPure) {
         ThisAdjustments[Index] = ThisAdjustment;
+        SavedThisAdjustments.push_back(std::make_pair(std::make_pair(GD, OGD),
+                                                      ThisAdjustment));
+      }
     }
     return true;
   }