aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVtable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r--lib/CodeGen/CGVtable.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp
index 857e661254..6fda6a4404 100644
--- a/lib/CodeGen/CGVtable.cpp
+++ b/lib/CodeGen/CGVtable.cpp
@@ -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;
}