summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-07-21 21:56:04 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-07-21 21:56:04 +0000
commit41457328187e784653baf6ce0221aaa0615c873f (patch)
tree9433e53ef4445c08d9f0e81cb105d25443af1536 /clang/test
parent4aaae18d7372e3fa943c02753269466b7499a6a5 (diff)
downloadbcm5719-llvm-41457328187e784653baf6ce0221aaa0615c873f.tar.gz
bcm5719-llvm-41457328187e784653baf6ce0221aaa0615c873f.zip
Fix diagnostic when loading a PCH which has different enabled/disabled state of -fobjc-arc. rdar://9818341
llvm-svn: 135707
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/PCH/arc.m12
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/test/PCH/arc.m b/clang/test/PCH/arc.m
index 6f7b8704d9e..84a8ccc24ad 100644
--- a/clang/test/PCH/arc.m
+++ b/clang/test/PCH/arc.m
@@ -1,9 +1,17 @@
// Test this without pch.
-// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -fobjc-arc -include %S/Inputs/arc.h -fsyntax-only -emit-llvm -o - %s
+// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -fobjc-arc -include %S/Inputs/arc.h -fsyntax-only -emit-llvm-only %s
// Test with pch.
// RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -fobjc-arc -x objective-c-header -o %t %S/Inputs/arc.h
-// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm -o - %s
+// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s
+
+// Test error when pch's -fobjc-arc state is different.
+// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=ERR1 %s
+// RUN: %clang_cc1 -emit-pch -fblocks -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -x objective-c-header -o %t %S/Inputs/arc.h
+// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin11 -fobjc-nonfragile-abi -fobjc-arc -include-pch %t -fsyntax-only -emit-llvm-only %s 2>&1 | FileCheck -check-prefix=ERR2 %s
array0 a0;
array1 a1;
+
+// CHECK-ERR1: PCH file was compiled with automated reference counting, which is currently disabled
+// CHECK-ERR2: PCH file was compiled without automated reference counting, which is currently enabled
OpenPOWER on IntegriCloud