[PATCH] D141775: [Clang] Export CanPassInRegisters as a type trait

Nikolas Klauser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 14 17:39:30 PDT 2023


philnik added a comment.

In D141775#4256381 <https://reviews.llvm.org/D141775#4256381>, @royjacobson wrote:

> In D141775#4255923 <https://reviews.llvm.org/D141775#4255923>, @philnik wrote:
>
>> Is this essentially "is_trivial_for_the_purposes_of_abi"?
>
> I'd say so. Are you asking for a potential libc++ use case?

Kinda. I first thought it would say whether the type is actually passed in registers. That would have been very useful for things like `__is_cheap_to_copy` and `move_only_function`. Unfortunately, trivial for the purposes of ABI isn't enough to know in these cases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141775



More information about the cfe-commits mailing list