[PATCH] D92808: [ObjC][ARC] Annotate calls with attributes instead of emitting retainRV or claimRV calls in the IR

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 13:37:20 PST 2021


rjmccall added a comment.

Okay, so it's important that we emit both attributes?  I'll take your word for it.



================
Comment at: llvm/include/llvm/Analysis/ObjCARCRVAttr.h:56
+  if (hasRetainRVOrClaimRVAttr(CB))
+    CB->removeAttribute(llvm::AttributeList::ReturnIndex, getRVAttrKeyStr());
+
----------------
This is just doing the lookup twice, right?  You can just unconditionally remove the attribute, here and below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92808



More information about the llvm-commits mailing list