[PATCH] D67028: Use musttail for variadic method thunks when possible

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 15:37:20 PDT 2019


rnk marked an inline comment as done.
rnk added inline comments.


================
Comment at: clang/test/CodeGenCXX/ms-thunks-variadic-return.cpp:9
+struct B : virtual A {
+  // expected-error at +1 2 {{cannot compile this return-adjusting thunk with variadic arguments yet}}
+  B *clone(const char *f, ...) override;
----------------
I do love the optimism of the CGM.ErrorUnsupported diagnostic: "cannot compile this ${unimplementable_feature} yet".

I suppose it could be done if we standardized a new ABI for variadic virtual methods with pointer-like return values, so that they emit the main implementation under a new symbol name that takes a va_list and then the variadic one thunks to it. =P


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67028/new/

https://reviews.llvm.org/D67028





More information about the cfe-commits mailing list