[PATCH] D135091: Create storage for the `_cmd` argument to the helper function for generated getters/setters of `direct` Objective-C properties.

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 15:56:08 PDT 2022


ahatanak added inline comments.


================
Comment at: clang/lib/CodeGen/CGObjC.cpp:1116
+// for the `_cmd` argument that no longer exists for direct methods.
+static llvm::Value *emitCmdLoadForGetterSetterBody(CodeGenFunction &CGF,
+                                                   ObjCMethodDecl *MD) {
----------------
Since this is loading from an uninitialized alloca, can we just pass an `undef` to the call to `objc_get/setProperty`? The optimization passes will just do that, but we can still reduce the code size at `-O0`.


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

https://reviews.llvm.org/D135091



More information about the cfe-commits mailing list