2015-07-18 04:09:56 +08:00
|
|
|
; RUN: %clang_cc1 -Os -emit-llvm -fobjc-arc -o - %s | FileCheck %s
|
|
|
|
|
|
|
|
target triple = "x86_64-apple-darwin10"
|
|
|
|
|
2018-12-19 04:33:00 +08:00
|
|
|
declare i8* @llvm.objc.retain(i8*)
|
|
|
|
declare void @llvm.objc.release(i8*)
|
2015-07-18 04:09:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: define void @test(
|
|
|
|
; CHECK-NOT: @objc_
|
|
|
|
; CHECK: }
|
|
|
|
define void @test(i8* %x, i1* %p) nounwind {
|
|
|
|
entry:
|
|
|
|
br label %loop
|
|
|
|
|
|
|
|
loop:
|
2018-12-19 04:33:00 +08:00
|
|
|
call i8* @llvm.objc.retain(i8* %x)
|
2015-07-18 04:09:56 +08:00
|
|
|
%q = load i1, i1* %p
|
|
|
|
br i1 %q, label %loop.more, label %exit
|
|
|
|
|
|
|
|
loop.more:
|
2018-12-19 04:33:00 +08:00
|
|
|
call void @llvm.objc.release(i8* %x)
|
2015-07-18 04:09:56 +08:00
|
|
|
br label %loop
|
|
|
|
|
|
|
|
exit:
|
2018-12-19 04:33:00 +08:00
|
|
|
call void @llvm.objc.release(i8* %x)
|
2015-07-18 04:09:56 +08:00
|
|
|
ret void
|
|
|
|
}
|