| John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 1 | // Test this without pch. | 
| John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include %S/Inputs/arc.h -fsyntax-only -emit-llvm-only %s | 
| John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 3 |  | 
|  | 4 | // Test with pch. | 
| John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 5 | // RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -x objective-c-header -o %t %S/Inputs/arc.h | 
|  | 6 | // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s | 
| Argyrios Kyrtzidis | 428382c | 2011-07-21 21:56:04 +0000 | [diff] [blame] | 7 |  | 
|  | 8 | // Test error when pch's -fobjc-arc state is different. | 
| John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 9 | // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=ERR1 %s | 
|  | 10 | // RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -x objective-c-header -o %t %S/Inputs/arc.h | 
|  | 11 | // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=ERR2 %s | 
| John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 12 |  | 
|  | 13 | array0 a0; | 
|  | 14 | array1 a1; | 
| Argyrios Kyrtzidis | 428382c | 2011-07-21 21:56:04 +0000 | [diff] [blame] | 15 |  | 
| Douglas Gregor | 7d5e81b | 2011-09-13 18:26:39 +0000 | [diff] [blame] | 16 | // CHECK-ERR1: Objective-C automated reference counting was enabled in PCH file but is currently disabled | 
|  | 17 | // CHECK-ERR2: Objective-C automated reference counting was disabled in PCH file but is currently enabled |