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:
> > >
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:
>
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:
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
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
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
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
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 ,
+
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
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 ,
+
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:
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
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
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
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
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
16 matches
Mail list logo