[PATCH] Make thunk this/return adjustment ABI-specific. Also, fix the return adjustment when using -cxx-abi microsoft
Reid Kleckner
rnk at google.com
Tue Oct 29 17:47:21 PDT 2013
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:980-981
@@ +979,4 @@
+
+ assert(TA.VCallOffsetOffset == 0 &&
+ "VtorDisp adjustment is not supported yet");
+
----------------
Timur Iskhodzhanov wrote:
> Reid Kleckner wrote:
> > I'd prefer CGF.ErrorUnsupported instead. That way we get a clang diagnostic in every build config and it can be easily scraped from logs.
> AST/VFTableBuilder doesn't set nonzero VCallOffsetOffset yet, so this really shouldn't be hit.
> I'll replace the assert with a proper codegen in the following patch, so not sure it's worth changing.
sounds good
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1014
@@ +1013,3 @@
+ int32_t IntSize =
+ getContext().getTypeSizeInChars(getContext().IntTy).getQuantity();
+ llvm::Value *VBPtr;
----------------
I'm frustrated that I can't think of a shorter way to write this.
================
Comment at: test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp:275
@@ -274,3 +274,3 @@
// THIS-THUNKS-Test1-NEXT: 0 | void this_adjustment::Test1::g()
- // THIS-THUNKS-Test1-NEXT: [this adjustment: -4 non-virtual]
+ // THIS-THUNKS-Test1-NEXT: this adjustment: -4 non-virtual
----------------
Timur Iskhodzhanov wrote:
> FTR, I've decided to bring back []
seems fine
http://llvm-reviews.chandlerc.com/D2026
More information about the cfe-commits
mailing list