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 | 3e9f3a0389488701bd1cb5c778d0e785c827d790 (patch) | |
tree | b535070ad57755695d14e9adf2d85557ab2255a6 /test/Transforms/ObjCARC | |
parent | 2a88555e0d92a22b50966b223bab19d8518a8f27 (diff) | |
download | llvm-3e9f3a0389488701bd1cb5c778d0e785c827d790.tar.gz llvm-3e9f3a0389488701bd1cb5c778d0e785c827d790.tar.bz2 llvm-3e9f3a0389488701bd1cb5c778d0e785c827d790.tar.xz |
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178369 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ObjCARC')
-rw-r--r-- | test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll b/test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll new file mode 100644 index 0000000000..4215b5c364 --- /dev/null +++ b/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 +} + |