[Bitcode] Fix bitcode compatibility issue with clang.arc.use intrinsic
authorSteven Wu <stevenwu@apple.com>
Fri, 8 Mar 2019 05:27:53 +0000 (05:27 +0000)
committerSteven Wu <stevenwu@apple.com>
Fri, 8 Mar 2019 05:27:53 +0000 (05:27 +0000)
commited9822928626a45a749b3297a46c8fb7375c814e
treebfa486ee36040d6ed56ce30c98d7c669bd6b1c5d
parent1488ee4bd5418a5536856676c350c9ee64488334
[Bitcode] Fix bitcode compatibility issue with clang.arc.use intrinsic

Summary:
In r349534, objc arc implementation is switched to use intrinsics and at
the same time, clang.arc.use is renamed to llvm.objc.clang.arc.use to
make the naming more consistent. The side-effect of that is llvm no
longer recognize it as intrinsics and codegen external references to
it instead.

Rather than upgrade the old intrinsics name to the new one and wait for
the arc-contract pass to remove it, simply remove it in the bitcode
upgrader.

rdar://problem/48607063

Reviewers: pete, ahatanak, erik.pilkington, dexonsmith

Reviewed By: pete, dexonsmith

Subscribers: jkorous, jdoerfert, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59112

llvm-svn: 355663
llvm/lib/IR/AutoUpgrade.cpp
llvm/test/Bitcode/upgrade-clang-arc-use.ll [new file with mode: 0644]
llvm/test/Bitcode/upgrade-clang-arc-use.ll.bc [new file with mode: 0644]