2011-10-02 09:16:38 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o - %s | FileCheck %s
|
2011-06-25 07:29:50 +08:00
|
|
|
|
|
|
|
void test0(void) {
|
|
|
|
extern id test0_helper(void);
|
|
|
|
__attribute__((objc_precise_lifetime)) id x = test0_helper();
|
|
|
|
test0_helper();
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define void @test0()
|
2011-06-25 07:29:50 +08:00
|
|
|
// CHECK: [[T0:%.*]] = call i8* @test0_helper()
|
|
|
|
// CHECK-NEXT: store i8* [[T0]], i8** [[X:%.*]], align 8
|
|
|
|
// CHECK-NEXT: call i8* @test0_helper()
|
2015-02-28 05:19:58 +08:00
|
|
|
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]], align 8
|
2013-02-22 17:10:20 +08:00
|
|
|
// CHECK-NEXT: call void asm sideeffect "", "r"(i8* [[T0]]) [[NUW:#[0-9]+]]
|
2011-06-25 07:29:50 +08:00
|
|
|
// CHECK-NEXT: ret void
|
|
|
|
}
|
2013-02-22 17:10:20 +08:00
|
|
|
|
|
|
|
// CHECK: attributes [[NUW]] = { nounwind }
|