xref: /minix3/external/bsd/llvm/dist/clang/test/PCH/arc.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// Test this without pch.
2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include %S/Inputs/arc.h -fsyntax-only -emit-llvm-only %s
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc// Test with pch.
5*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -x objective-c-header -o %t %S/Inputs/arc.h
6*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc// Test error when pch's -fobjc-arc state is different.
9*f4a2713aSLionel Sambuc// RUN: not %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=CHECK-ERR1 %s
10*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -x objective-c-header -o %t %S/Inputs/arc.h
11*f4a2713aSLionel Sambuc// RUN: not %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=CHECK-ERR2 %s
12*f4a2713aSLionel Sambuc
13*f4a2713aSLionel Sambucarray0 a0;
14*f4a2713aSLionel Sambucarray1 a1;
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc// CHECK-ERR1: Objective-C automated reference counting was enabled in PCH file but is currently disabled
17*f4a2713aSLionel Sambuc// CHECK-ERR2: Objective-C automated reference counting was disabled in PCH file but is currently enabled
18