[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 6 16:25:30 PDT 2018


rjmccall added a comment.

In https://reviews.llvm.org/D45384#1060369, @ahatanak wrote:

> Yes. I intended it as a property that propagates to classes that contain or derive from the type.
>
> Would it make it less confusing if I merged CXXRecordDecl::CanPassInRegisters and RecordDecl::CannotPassInRegisters into a single enum? For example, the enum could have three enumerators, "CanPass", "CannotPass", "CanNeverPass", or something. Both "CannotPass" and "CanNeverPass" would force the type to be passed indirectly, and the only difference is that "CanNeverPass" propagates its property outwards and "CannotPass" doesn't. C structs are either "CanPass" or "CanNeverPass" while C++ structs can take any of the three values.


Yes, I think that would help a lot.


Repository:
  rC Clang

https://reviews.llvm.org/D45384





More information about the cfe-commits mailing list