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

2022-10-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1125 +llvm::Type *selType = CGF.ConvertType(CGF.getContext().getObjCSelType()); +return llvm::UndefValue::get(selType); + } mwyman wrote: > nlopes wrote: > > mwyman wrote: > > >

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

2022-10-07 Thread Michael Wyman via Phabricator via cfe-commits
mwyman marked 2 inline comments as done. mwyman added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1125 +llvm::Type *selType = CGF.ConvertType(CGF.getContext().getObjCSelType()); +return llvm::UndefValue::get(selType); + } nlopes wrote: >

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

2022-10-07 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 466212. mwyman edited the summary of this revision. mwyman added a comment. Updated to use `PoisonValue` rather than `UndefValue`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135091/new/ https://reviews.llvm.org/D135091 Files:

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

2022-10-07 Thread Nuno Lopes via Phabricator via cfe-commits
nlopes added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1125 +llvm::Type *selType = CGF.ConvertType(CGF.getContext().getObjCSelType()); +return llvm::UndefValue::get(selType); + } mwyman wrote: > nlopes wrote: > > Please consider using

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

2022-10-07 Thread Michael Wyman via Phabricator via cfe-commits
mwyman added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1125 +llvm::Type *selType = CGF.ConvertType(CGF.getContext().getObjCSelType()); +return llvm::UndefValue::get(selType); + } nlopes wrote: > Please consider using PoisonValue here

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

2022-10-07 Thread Nuno Lopes via Phabricator via cfe-commits
nlopes added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1125 +llvm::Type *selType = CGF.ConvertType(CGF.getContext().getObjCSelType()); +return llvm::UndefValue::get(selType); + } Please consider using PoisonValue here instead (if

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

2022-10-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. LGTM Comment at: clang/test/CodeGenObjC/direct-method.m:178 +// CHECK-NEXT: [[IVAR:%.*]] = load {{.*}} @"OBJC_IVAR_$_Root._objectProperty", +// CHECK-NEXT: call i8* @objc_getProperty(i8* noundef [[SELF]], i8* noundef

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

2022-10-06 Thread Michael Wyman via Phabricator via cfe-commits
mwyman marked 2 inline comments as done. mwyman 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 , +

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

2022-10-06 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 465925. mwyman added a comment. Herald added a subscriber: nlopes. Use explicit `undef` for the `cmd` parameter to `objc_getProperty`/`objc_setProperty` rather declaring and not initializing storage for the implicit `_cmd`. CHANGES SINCE LAST ACTION

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

2022-10-06 Thread Akira Hatanaka via Phabricator via cfe-commits
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 , +

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

2022-10-06 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 465896. mwyman marked an inline comment as done. mwyman added a comment. Extracted the common new code into a helper function. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135091/new/ https://reviews.llvm.org/D135091 Files:

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

2022-10-06 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. LGTM but waiting on Akira would be nice imho. Comment at: clang/lib/CodeGen/CGObjC.cpp:1192 // corresponding gcc code. -llvm::Value *cmd = - Builder.CreateLoad(GetAddrOfLocalVar(getterMethod->getCmdDecl()), "cmd"); +if

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

2022-10-06 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. @ahatanak how does this diff look to you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135091/new/ https://reviews.llvm.org/D135091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2022-10-06 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1194-1196 + // emitted for it to be passed to the property helper. Since the `_cmd` + // argument was never being initialized by the caller before, still

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

2022-10-06 Thread Michael Wyman via Phabricator via cfe-commits
mwyman marked an inline comment as done. mwyman added inline comments. Comment at: clang/test/CodeGenObjC/direct-method.m:171-177 +// Check the synthesized objectProperty calls objc_getProperty(); this also +// checks that the synthesized method accesses _cmd (or rather loads

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

2022-10-06 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 465857. mwyman retitled this revision from "Load the `_cmd` selector for generated getters/setters of `direct` Objective-C properties." to "Create storage for the `_cmd` argument to the helper function for generated getters/setters of `direct` Objective-C