summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2019-08-08 16:59:31 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2019-08-08 16:59:31 +0000
commitecde8c7ad47447c5bd02f4bb084843ae20bdbb34 (patch)
treeeab80b8855da7a87b0c23ef4eb70b15d2cfa4acd /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentcaa0db13181e97b1c62a65168227b80cbdc2ac5e (diff)
downloadbcm5719-llvm-ecde8c7ad47447c5bd02f4bb084843ae20bdbb34.tar.gz
bcm5719-llvm-ecde8c7ad47447c5bd02f4bb084843ae20bdbb34.zip
[ObjC][ARC] Upgrade calls to ARC runtime functions to intrinsic calls if
the bitcode has the arm64 retainAutoreleasedReturnValue marker The ARC middle-end passes stopped optimizing or transforming bitcode that has been compiled with old compilers after we started emitting calls to ARC runtime functions as intrinsic calls instead of normal function calls in the front-end and made changes to teach the ARC middle-end passes about those intrinsics (see r349534). This patch converts calls to ARC runtime functions that are not intrinsic functions to intrinsic function calls if the bitcode has the arm64 retainAutoreleasedReturnValue marker. Checking for the presence of the marker is necessary to make sure we aren't changing ARC function calls that were originally MRR message sends (see r349952). rdar://problem/53280660 Differential Revision: https://reviews.llvm.org/D65902 llvm-svn: 368311
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 29dc7f61639..cba9385318c 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -5313,6 +5313,7 @@ Error BitcodeReader::materializeModule() {
UpgradeModuleFlags(*TheModule);
UpgradeRetainReleaseMarker(*TheModule);
+ UpgradeARCRuntimeCalls(*TheModule);
return Error::success();
}
OpenPOWER on IntegriCloud