[PATCH] D77592: [NFC}[CodeGen] Make VTable initialization a method of CGCXXABI

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 13 15:47:28 PDT 2020


leonardchan added a comment.

In D77592#1979030 <https://reviews.llvm.org/D77592#1979030>, @rjmccall wrote:

> This is a global switch, right, not something that's mix-and-match between hierarchies or even between classes?  I think I would prefer that the ABI object just tell us the expected layout of a v-table entry (as an enum) rather than forcing a bunch of different callbacks.  Seems more composable, among other things.


I see. Yeah, this isn't meant to be mix-and-matched. My initial reasoning for making it virtual was so that it could be specific to Fuchsia for now, then if other platforms wanted to use it, we could abstract it out then other ABIs can just inherit from it. But it seems that the same effect can be done without a set of callbacks.

Will update such that the ABI selects the vtable entry layout.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77592





More information about the cfe-commits mailing list