[PATCH] Fix PR18967 -- Bad this adjustment for virtual methods in a diamond virtual inheritance hierarchy
Reid Kleckner
rnk at google.com
Thu Mar 6 15:00:41 PST 2014
LGTM
================
Comment at: test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp:220
@@ -219,3 +219,1 @@
-struct X : virtual VBase {
- int x;
----------------
Why change this?
================
Comment at: lib/AST/VTableBuilder.cpp:2909
@@ -2946,1 +2908,3 @@
+ ReturnAdjustingThunk = (MD != OverriderMD) || !ThisAdjustmentOffset.isEmpty();
+
----------------
Can you comment on why these conditions imply a return adjusting thunk?
================
Comment at: lib/AST/VTableBuilder.cpp:2878
@@ +2877,3 @@
+ bool ReturnAdjustingThunk = false;
+ CharUnits ThisOffset = ComputeThisOffset(Overrider);
+ ThisAdjustmentOffset.NonVirtual =
----------------
Yep, I expected the essence of the change was going to be hoisting this calculation out of the 'if' below.
http://llvm-reviews.chandlerc.com/D2985
More information about the cfe-commits
mailing list