2015-07-08 09:00:30 +08:00
|
|
|
// REQUIRES: x86-registered-target
|
2011-06-16 07:02:42 +08:00
|
|
|
// Test this without pch.
|
2011-10-02 09:16:38 +08:00
|
|
|
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include %S/Inputs/arc.h -fsyntax-only -emit-llvm-only %s
|
2011-06-16 07:02:42 +08:00
|
|
|
|
|
|
|
// Test with pch.
|
2011-10-02 09:16:38 +08:00
|
|
|
// RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -x objective-c-header -o %t %S/Inputs/arc.h
|
|
|
|
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s
|
2011-07-22 05:56:04 +08:00
|
|
|
|
|
|
|
// Test error when pch's -fobjc-arc state is different.
|
2013-08-12 20:51:05 +08:00
|
|
|
// 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
|
2011-10-02 09:16:38 +08:00
|
|
|
// RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -x objective-c-header -o %t %S/Inputs/arc.h
|
2013-08-12 20:51:05 +08:00
|
|
|
// 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
|
2011-06-16 07:02:42 +08:00
|
|
|
|
|
|
|
array0 a0;
|
|
|
|
array1 a1;
|
2011-07-22 05:56:04 +08:00
|
|
|
|
2011-09-14 02:26:39 +08:00
|
|
|
// CHECK-ERR1: Objective-C automated reference counting was enabled in PCH file but is currently disabled
|
|
|
|
// CHECK-ERR2: Objective-C automated reference counting was disabled in PCH file but is currently enabled
|