Debian Codegraph @

clang/test/PCH/arc.m

raw
1 // REQUIRES: x86-registered-target
2 // Test this without pch.
3
4 // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include %S/Inputs/arc.h -emit-llvm-only %s
5
6 // Test with pch.
7 // RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -x objective-c-header -o %t %S/Inputs/arc.h
8 // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -emit-llvm-only %s
9
10 // Test error when pch's -fobjc-arc state is different.
11 // RUN: not %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -include-pch %t -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=CHECK-ERR1 %s
12 // RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -x objective-c-header -o %t %S/Inputs/arc.h
13 // RUN: not %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=CHECK-ERR2 %s
14
15 array0 a0;
16 array1 a1;
17
18 // CHECK-ERR1: Objective-C automated reference counting was enabled in precompiled file '{{.*}}' but is currently disabled
19 // CHECK-ERR2: Objective-C automated reference counting was disabled in precompiled file '{{.*}}' but is currently enabled