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

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 6 15:23:58 PDT 2018


ahatanak added a comment.

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.


Repository:
  rC Clang

https://reviews.llvm.org/D45384





More information about the cfe-commits mailing list