[cfe-commits] r135707 - in /cfe/trunk: include/clang/Basic/DiagnosticFrontendKinds.td test/PCH/arc.m

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Jul 21 14:56:04 PDT 2011


Author: akirtzidis
Date: Thu Jul 21 16:56:04 2011
New Revision: 135707

URL: http://llvm.org/viewvc/llvm-project?rev=135707&view=rev
Log:
Fix diagnostic when loading a PCH which has different enabled/disabled state of -fobjc-arc. rdar://9818341

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
    cfe/trunk/test/PCH/arc.m

Modified: cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td?rev=135707&r1=135706&r2=135707&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td Thu Jul 21 16:56:04 2011
@@ -138,8 +138,8 @@
     "Objective-C ABI but the %select{32-bit|enhanced non-fragile}1 "
     "Objective-C ABI is selected">;
 def warn_pch_auto_ref_count : Error<
-    "PCH file was compiled %select{without|with} automated reference counting,"
-    "which is currently %select{disabled|enabled}">;
+    "PCH file was compiled %select{without|with}0 automated reference counting,"
+    " which is currently %select{disabled|enabled}1">;
 def warn_pch_apple_kext : Error<
     "PCH file was compiled %select{with|without}0 support for Apple's kernel "
     "extensions ABI but it is currently %select{disabled|enabled}1">;

Modified: cfe/trunk/test/PCH/arc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/arc.m?rev=135707&r1=135706&r2=135707&view=diff
==============================================================================
--- cfe/trunk/test/PCH/arc.m (original)
+++ cfe/trunk/test/PCH/arc.m Thu Jul 21 16:56:04 2011
@@ -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





More information about the cfe-commits mailing list