diff options
| author | Michael Gottesman <mgottesman@apple.com> | 2013-03-29 21:15:23 +0000 |
|---|---|---|
| committer | Michael Gottesman <mgottesman@apple.com> | 2013-03-29 21:15:23 +0000 |
| commit | 3b8f8778607d0438acc9bc2c87a5870cdc142da6 (patch) | |
| tree | f0634ea3786cd767a1bb86e9fcdd0ca5d70d971f /llvm/test/Transforms/ObjCARC | |
| parent | add82b3c755d960ad2924138ac8c3fa5562fb2bb (diff) | |
| download | bcm5719-llvm-3b8f8778607d0438acc9bc2c87a5870cdc142da6.tar.gz bcm5719-llvm-3b8f8778607d0438acc9bc2c87a5870cdc142da6.zip | |
Add clang.arc.used to ModuleHasARC so ARC always runs if said call is present in a module.
clang.arc.used is an interesting call for ARC since ObjCARCContract
needs to run to remove said intrinsic to avoid a linker error (since the
call does not exist).
llvm-svn: 178369
Diffstat (limited to 'llvm/test/Transforms/ObjCARC')
| -rw-r--r-- | llvm/test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll b/llvm/test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll new file mode 100644 index 00000000000..4215b5c3646 --- /dev/null +++ b/llvm/test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll @@ -0,0 +1,16 @@ +; RUN: opt -objc-arc-contract -S < %s | FileCheck %s + +; This file makes sure that clang.arc.used is removed even if no other ARC +; interesting calls are in the module. + +declare void @clang.arc.use(...) nounwind + +; Kill calls to @clang.arc.use(...) +; CHECK: define void @test0( +; CHECK-NOT: clang.arc.use +; CHECK: } +define void @test0(i8* %a, i8* %b) { + call void (...)* @clang.arc.use(i8* %a, i8* %b) nounwind + ret void +} + |

