rjmccall added a comment.

I think the plan should be to use this code pattern on all targets, but 
starting it with arm64 seems fine.



================
Comment at: clang/lib/CodeGen/CGObjC.cpp:2342
+    attrs = attrs.addAttribute(CGF.getLLVMContext(),
+                               llvm::AttributeList::ReturnIndex, "rv_marker");
+    callBase->setAttributes(attrs);
----------------
It's weird that these attributes use two different capitalization styles.  
Also, why are they both needed?  Did you consider making the role 
(retain/claim) be the value of the attribute rather than a separate attribute?

Should the attribute be namespaced, like `clang.arc.rv_marker`?

Let's go ahead and add globals for these strings so we can refer to them 
symbolically, like you did with `retainRVMarkerKey`.  Is there an LLVM header 
for ARC optimization we could reasonably pull them from, or are we doomed to 
repeat ourselves across projects?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92808

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to