aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll')
-rw-r--r--test/Transforms/ObjCARC/clang-arc-used-intrinsic-removed-if-isolated.ll16
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
+}
+