[ObjC][ARC] Fix a bug where the inline-asm retain/claim RV marker wasn't
authorAkira Hatanaka <ahatanaka@apple.com>
Sat, 19 Dec 2020 00:59:06 +0000 (16:59 -0800)
committerAkira Hatanaka <ahatanaka@apple.com>
Sat, 19 Dec 2020 00:59:06 +0000 (16:59 -0800)
commitffd982f7db58acf6653f987ca6411712feea25c3
tree6276084da23ac532f768e1e686e8cd9421020465
parentaf83b74dc2e563c429dfcf5bd0a21dd2d4b8af7b
[ObjC][ARC] Fix a bug where the inline-asm retain/claim RV marker wasn't
inserted when the original call had a 'returned' argument

The code is testing whether the instruction BBI points to is the call
that is paired up with the retainRV/claimRV call, but it doesn't work
when the call has a 'returned' argument since GetArgRCIdentityRoot looks
through 'returned' arguments.

rdar://72485383
llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
llvm/test/Transforms/ObjCARC/contract-marker.ll