leonardchan added inline comments.

================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3293
+static bool SupportsRelativeCXXVTables(const llvm::Triple &T) {
+  return T.isOSFuchsia();
+}
----------------
phosek wrote:
> Could we instead enable it inside `FuchsiaCXXABI`?
So we can't necessarily turn this on in just FuchsiaCXXABI/CodeGen because many 
of the vtable offsets and components are constructed in the AST stage which is 
later consumed by codegen and the CXXABI classes to make the vtables. More 
specifically, it's the `ItaniumVTableContext` created in 
`ASTContext::getVTableContext()` in charge of calculating these offsets.

I put it here because controlling the flag seems like the easiest way to set a 
default value given the target, and it's available either during or before the 
AST stage.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102374

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to