summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2019-08-08 23:33:17 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2019-08-08 23:33:17 +0000
commit3e61ed02993ef1d0a534b682605475d3f4ce59b9 (patch)
tree5208e608c260c7422ef7dcb44977d7247b4c27f6 /llvm/lib
parent5b9508396c83d4ac58a15ae6d92735fe538757dc (diff)
downloadbcm5719-llvm-3e61ed02993ef1d0a534b682605475d3f4ce59b9.tar.gz
bcm5719-llvm-3e61ed02993ef1d0a534b682605475d3f4ce59b9.zip
Change the return type of UpgradeARCRuntimeCalls to void
Nothing is using the function return. llvm-svn: 368367
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/AutoUpgrade.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 2caadfd8ac1..6d1305393e1 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -3854,28 +3854,26 @@ bool llvm::UpgradeRetainReleaseMarker(Module &M) {
return Changed;
}
-bool llvm::UpgradeARCRuntimeCalls(Module &M) {
+void llvm::UpgradeARCRuntimeCalls(Module &M) {
auto UpgradeToIntrinsic = [&](const char *OldFunc,
llvm::Intrinsic::ID IntrinsicFunc) {
Function *Fn = M.getFunction(OldFunc);
if (!Fn)
- return false;
+ return;
Function *NewFn = llvm::Intrinsic::getDeclaration(&M, IntrinsicFunc);
Fn->replaceAllUsesWith(NewFn);
Fn->eraseFromParent();
- return true;
};
// Unconditionally convert "clang.arc.use" to "llvm.objc.clang.arc.use".
- bool Changed =
- UpgradeToIntrinsic("clang.arc.use", llvm::Intrinsic::objc_clang_arc_use);
+ UpgradeToIntrinsic("clang.arc.use", llvm::Intrinsic::objc_clang_arc_use);
// Return if the bitcode doesn't have the arm64 retainAutoreleasedReturnValue
// marker. We don't know for sure that it was compiled with ARC in that case.
if (!M.getModuleFlag("clang.arc.retainAutoreleasedReturnValueMarker"))
- return false;
+ return;
std::pair<const char *, llvm::Intrinsic::ID> RuntimeFuncs[] = {
{"objc_autorelease", llvm::Intrinsic::objc_autorelease},
@@ -3917,9 +3915,7 @@ bool llvm::UpgradeARCRuntimeCalls(Module &M) {
llvm::Intrinsic::objc_arc_annotation_bottomup_bbend}};
for (auto &I : RuntimeFuncs)
- Changed |= UpgradeToIntrinsic(I.first, I.second);
-
- return Changed;
+ UpgradeToIntrinsic(I.first, I.second);
}
bool llvm::UpgradeModuleFlags(Module &M) {
OpenPOWER on IntegriCloud