[ObjC][ARC] Check whether the return and parameter types of the old and
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 23 Oct 2019 14:38:52 +0000 (07:38 -0700)
committerAkira Hatanaka <ahatanaka@apple.com>
Thu, 24 Oct 2019 20:08:50 +0000 (13:08 -0700)
commit31b752cbf0db5a022ec21a9db5bd217c46f5cf4a
tree76618234e9e11eeeff15dbf2052776316a4356dc
parenta5376f6322132e3b0664de55348f6bbba1fabd00
[ObjC][ARC] Check whether the return and parameter types of the old and
new functions are compatible before upgrading a function call to an
intrinsic call.

Sometimes users insert calls to ARC runtime functions that are not
compatible with the corresponding intrinsic functions (for example,
'i8* @objc_storeStrong' instead of 'void @objc_storeStrong'). Don't
upgrade those calls.

rdar://problem/56447127
llvm/lib/IR/AutoUpgrade.cpp
llvm/test/Bitcode/upgrade-arc-runtime-calls-bitcast.bc [new file with mode: 0644]
llvm/test/Bitcode/upgrade-arc-runtime-calls-bitcast.ll [new file with mode: 0644]