[PATCH] D135273: [Clang][ObjC] Add optionality to property attribute strings.
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 19:44:50 PDT 2022
ahatanak accepted this revision.
ahatanak added a comment.
This revision is now accepted and ready to land.
This LGTM for apple's runtime assuming it knows how to handle the new string.
================
Comment at: clang/lib/AST/ASTContext.cpp:7857
+ if (PD->isOptional()) {
+ S += ",?";
----------------
You can omit braces here.
================
Comment at: clang/test/CodeGenObjC/objc-asm-attribute-test.m:20
+ at class Message;
+
----------------
Do you need this change?
================
Comment at: clang/test/CodeGenObjC/objc-asm-attribute-test.m:72
+// CHECK-NEXT: @OBJC_PROP_NAME_ATTR_.11 = private unnamed_addr constant [7 x i8] c"T@,?,&\00", section "__TEXT,__objc_methname,cstring_literals", align 1
+
// CHECK: private unnamed_addr constant [42 x i8] c"T@\22MySecretNamespace.Message\22,&,V_msgProp\00"
----------------
Can you use regular expression for the two globals above and check they are referenced in `@"_OBJC_$_PROP_LIST_MySecretNamespace.Protocol2`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135273/new/
https://reviews.llvm.org/D135273
More information about the cfe-commits
mailing list