[PATCH] D92361: [trivial-abi] Support types without a copy or move constructor.

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 18 15:55:13 PST 2020


ahatanak added a comment.

We could probably do something like what this patch is doing and determine whether a class can be passed in registers based on whether its subobjects can be passed in registers. If all of the subobjects can be passed in registers, the current class can be passed in registers too unless something declared in the current class forces it to be passed indirectly (e.g., a virtual function is declared).

Alternatively, if we don't want to diverge too much from the existing Itanium ABI rules, a class annotated with `trivial_abi` should be treated as if its copy/move constructors are trivial and aren't inaccessible nor deleted for the purpose of calls.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92361



More information about the cfe-commits mailing list