From 01ed063edbddd72c1b3f3f7b060bf9a0766e5d09 Mon Sep 17 00:00:00 2001
From: Fariborz Jahanian <fjahanian@apple.com>
Date: Mon, 14 Dec 2009 18:00:56 +0000
Subject: [PATCH] Make tests use the new clang -cc1 flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91303 91177308-0d34-0410-b5e6-96231b3b80d8
---
 test/CodeCompletion/objc-message.m                  | 4 ++--
 test/CodeGen/2008-08-25-incompatible-cond-expr.m    | 2 +-
 test/CodeGen/2009-01-21-invalid-debug-info.m        | 2 +-
 test/CodeGen/function-decay.m                       | 2 +-
 test/CodeGen/rdr-6732143-dangling-block-reference.m | 2 +-
 test/Coverage/ast-printing.m                        | 6 +++---
 test/Coverage/codegen-gnu.m                         | 2 +-
 test/Coverage/codegen-next.m                        | 4 ++--
 test/Coverage/parse-callbacks.m                     | 4 ++--
 test/FixIt/fixit-objc.m                             | 4 ++--
 test/Index/TestClassDecl.m                          | 2 +-
 test/Index/TestClassForwardDecl.m                   | 2 +-
 test/Index/c-index-api-fn-scan.m                    | 2 +-
 test/Index/c-index-api-loadTU-test.m                | 2 +-
 test/Index/c-index-getCursor-test.m                 | 2 +-
 test/Index/objc-decls.m                             | 4 ++--
 test/Index/objc-message.m                           | 4 ++--
 test/PCH/method_pool.m                              | 6 +++---
 test/PCH/objc_exprs.m                               | 6 +++---
 test/PCH/objc_import.m                              | 6 +++---
 test/PCH/objc_methods.m                             | 6 +++---
 test/PCH/objc_property.m                            | 6 +++---
 test/Preprocessor/non_fragile_feature.m             | 2 +-
 test/Preprocessor/non_fragile_feature1.m            | 2 +-
 test/Preprocessor/objc-pp.m                         | 2 +-
 test/Sema/block-as-object.m                         | 2 +-
 test/Sema/rdar6248119.m                             | 2 +-
 test/SemaTemplate/instantiate-function-1.mm         | 2 +-
 test/SemaTemplate/instantiate-objc-1.mm             | 2 +-
 29 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/test/CodeCompletion/objc-message.m b/test/CodeCompletion/objc-message.m
index d16a745b71f..58fc4f5d68f 100644
--- a/test/CodeCompletion/objc-message.m
+++ b/test/CodeCompletion/objc-message.m
@@ -23,13 +23,13 @@ void func() {
   Foo *obj = [Foo new];
   [obj xx];
 }
-// RUN: clang-cc -fsyntax-only -code-completion-at=%s:23:19 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
+// RUN: clang -cc1 -fsyntax-only -code-completion-at=%s:23:19 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
 // CHECK-CC1: categoryClassMethod : 0
 // CHECK-CC1: classMethod1:withKeyword: : 0
 // CHECK-CC1: classMethod2 : 0
 // CHECK-CC1: new : 0
 // CHECK-CC1: protocolClassMethod : 0
-// RUN: clang-cc -fsyntax-only -code-completion-at=%s:24:8 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
+// RUN: clang -cc1 -fsyntax-only -code-completion-at=%s:24:8 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
 // CHECK-CC2: categoryInstanceMethod : 0
 // CHECK-CC2: instanceMethod1 : 0
 // CHECK-CC2: protocolInstanceMethod : 0
diff --git a/test/CodeGen/2008-08-25-incompatible-cond-expr.m b/test/CodeGen/2008-08-25-incompatible-cond-expr.m
index 3cc42d89f6f..fa9b1970f7f 100644
--- a/test/CodeGen/2008-08-25-incompatible-cond-expr.m
+++ b/test/CodeGen/2008-08-25-incompatible-cond-expr.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -emit-llvm -o %t %s
+// RUN: clang -cc1 -emit-llvm -o %t %s
 
 @protocol P0
 @end
diff --git a/test/CodeGen/2009-01-21-invalid-debug-info.m b/test/CodeGen/2009-01-21-invalid-debug-info.m
index 2662b922a03..1c1028b4ea9 100644
--- a/test/CodeGen/2009-01-21-invalid-debug-info.m
+++ b/test/CodeGen/2009-01-21-invalid-debug-info.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -S -g -o %t.s %s
+// RUN: clang -cc1 -S -g -o %t.s %s
 
 // FIXME: This test case can be removed at some point (since it will
 // no longer effectively test anything). The reason it was causing
diff --git a/test/CodeGen/function-decay.m b/test/CodeGen/function-decay.m
index 5652fdbb21e..4b8e3602d46 100644
--- a/test/CodeGen/function-decay.m
+++ b/test/CodeGen/function-decay.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -emit-llvm -o -
+// RUN: clang -cc1 %s -emit-llvm -o -
 
 @interface I0 @end
 @implementation I0
diff --git a/test/CodeGen/rdr-6732143-dangling-block-reference.m b/test/CodeGen/rdr-6732143-dangling-block-reference.m
index 2d1baa62200..90641dd083c 100644
--- a/test/CodeGen/rdr-6732143-dangling-block-reference.m
+++ b/test/CodeGen/rdr-6732143-dangling-block-reference.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-llvm %s -o -
+// RUN: clang -cc1 -triple x86_64-apple-darwin9 -emit-llvm %s -o -
 
 void f0(id x) {
   @synchronized (x) {      
diff --git a/test/Coverage/ast-printing.m b/test/Coverage/ast-printing.m
index 1b812288fed..a864e2d72b8 100644
--- a/test/Coverage/ast-printing.m
+++ b/test/Coverage/ast-printing.m
@@ -1,5 +1,5 @@
-// RUN: clang-cc -fsyntax-only %s
-// RUN: clang-cc -ast-print %s
-// RUN: clang-cc -ast-dump %s
+// RUN: clang -cc1 -fsyntax-only %s
+// RUN: clang -cc1 -ast-print %s
+// RUN: clang -cc1 -ast-dump %s
 
 #include "objc-language-features.inc"
diff --git a/test/Coverage/codegen-gnu.m b/test/Coverage/codegen-gnu.m
index bc8d6d642e4..19480926145 100644
--- a/test/Coverage/codegen-gnu.m
+++ b/test/Coverage/codegen-gnu.m
@@ -1,3 +1,3 @@
-// RUN: clang-cc -triple i386-unknown-unknown -fgnu-runtime -emit-llvm -o %t %s
+// RUN: clang -cc1 -triple i386-unknown-unknown -fgnu-runtime -emit-llvm -o %t %s
 
 #include "objc-language-features.inc"
diff --git a/test/Coverage/codegen-next.m b/test/Coverage/codegen-next.m
index f211a5914e5..d78f93e61d2 100644
--- a/test/Coverage/codegen-next.m
+++ b/test/Coverage/codegen-next.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -emit-llvm -o %t %s
-// RUN: clang-cc -g -emit-llvm -o %t %s
+// RUN: clang -cc1 -emit-llvm -o %t %s
+// RUN: clang -cc1 -g -emit-llvm -o %t %s
 
 #include "objc-language-features.inc"
diff --git a/test/Coverage/parse-callbacks.m b/test/Coverage/parse-callbacks.m
index 310a1a6f6e2..7666d19432d 100644
--- a/test/Coverage/parse-callbacks.m
+++ b/test/Coverage/parse-callbacks.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -parse-noop %s
-// RUN: clang-cc -parse-print-callbacks %s
+// RUN: clang -cc1 -parse-noop %s
+// RUN: clang -cc1 -parse-print-callbacks %s
 
 #include "objc-language-features.inc"
diff --git a/test/FixIt/fixit-objc.m b/test/FixIt/fixit-objc.m
index 21aebfe3a96..cdf2057290e 100644
--- a/test/FixIt/fixit-objc.m
+++ b/test/FixIt/fixit-objc.m
@@ -1,5 +1,5 @@
-// RUN: clang-cc -pedantic -fixit %s -o %t
-// RUN: clang-cc -pedantic -x objective-c %t -verify
+// RUN: clang -cc1 -pedantic -fixit %s -o %t
+// RUN: clang -cc1 -pedantic -x objective-c %t -verify
 
 /* This is a test of the various code modification hints that are
    provided as part of warning or extension diagnostics. All of the
diff --git a/test/Index/TestClassDecl.m b/test/Index/TestClassDecl.m
index 9009f78e574..12ae4f45162 100644
--- a/test/Index/TestClassDecl.m
+++ b/test/Index/TestClassDecl.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
+// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
 // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck -check-prefix=scan %s
 // RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=load %s
 
diff --git a/test/Index/TestClassForwardDecl.m b/test/Index/TestClassForwardDecl.m
index 31b7c6c170c..db9a1eb5c7a 100644
--- a/test/Index/TestClassForwardDecl.m
+++ b/test/Index/TestClassForwardDecl.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
+// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
 // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck -check-prefix=scan %s
 // RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=load %s
 
diff --git a/test/Index/c-index-api-fn-scan.m b/test/Index/c-index-api-fn-scan.m
index 3e2c9c272a2..0350d87b39e 100644
--- a/test/Index/c-index-api-fn-scan.m
+++ b/test/Index/c-index-api-fn-scan.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
+// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
 // RUN: c-index-test -test-load-tu %t.ast scan-function | FileCheck %s
 
 
diff --git a/test/Index/c-index-api-loadTU-test.m b/test/Index/c-index-api-loadTU-test.m
index 1d5a9a89315..446f588c4f9 100644
--- a/test/Index/c-index-api-loadTU-test.m
+++ b/test/Index/c-index-api-loadTU-test.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
+// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
 // RUN: c-index-test -test-load-tu %t.ast all | FileCheck %s
 
 
diff --git a/test/Index/c-index-getCursor-test.m b/test/Index/c-index-getCursor-test.m
index 3653a9c2e21..d6081bc9de8 100644
--- a/test/Index/c-index-getCursor-test.m
+++ b/test/Index/c-index-getCursor-test.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
+// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast
 // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck %s
 @interface Foo 
 {
diff --git a/test/Index/objc-decls.m b/test/Index/objc-decls.m
index ff396788771..62a43da007b 100644
--- a/test/Index/objc-decls.m
+++ b/test/Index/objc-decls.m
@@ -1,5 +1,5 @@
-// RUN: clang-cc -emit-pch %S/Inputs/t1.m -o %t1.m.ast
-// RUN: clang-cc -emit-pch %S/Inputs/t2.m -o %t2.m.ast
+// RUN: clang -cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast
+// RUN: clang -cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast
 
 // RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/Inputs/t1.m:12:12 -print-decls > %t
 // RUN: cat %t | count 2
diff --git a/test/Index/objc-message.m b/test/Index/objc-message.m
index de61278af87..568ca9494f5 100644
--- a/test/Index/objc-message.m
+++ b/test/Index/objc-message.m
@@ -1,5 +1,5 @@
-// RUN: clang-cc -emit-pch %S/Inputs/t1.m -o %t1.m.ast
-// RUN: clang-cc -emit-pch %S/Inputs/t2.m -o %t2.m.ast
+// RUN: clang -cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast
+// RUN: clang -cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast
 
 // RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/Inputs/objc.h:5:13 -print-refs > %t
 // RUN: cat %t | count 1
diff --git a/test/PCH/method_pool.m b/test/PCH/method_pool.m
index 053438828e3..17e2420081f 100644
--- a/test/PCH/method_pool.m
+++ b/test/PCH/method_pool.m
@@ -1,9 +1,9 @@
 // Test this without pch.
-// RUN: clang-cc -include %S/method_pool.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -include %S/method_pool.h -fsyntax-only -verify %s
 
 // Test with pch.
-// RUN: clang-cc -x objective-c -emit-pch -o %t %S/method_pool.h
-// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s 
+// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/method_pool.h
+// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s 
 
 int message_id(id x) {
    return [x instMethod:17]; // expected-warning{{multiple methods}}
diff --git a/test/PCH/objc_exprs.m b/test/PCH/objc_exprs.m
index 9eb5a113a24..0c12b8e177f 100644
--- a/test/PCH/objc_exprs.m
+++ b/test/PCH/objc_exprs.m
@@ -1,9 +1,9 @@
 // Test this without pch.
-// RUN: clang-cc -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s
 
 // Test with pch.
-// RUN: clang-cc -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h
-// RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s 
+// RUN: clang -cc1 -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h
+// RUN: clang -cc1 -fblocks -include-pch %t -fsyntax-only -verify %s 
 
 // Expressions
 int *A1 = (objc_string)0;   // expected-warning {{aka 'id'}}
diff --git a/test/PCH/objc_import.m b/test/PCH/objc_import.m
index 12893861585..c109f408366 100644
--- a/test/PCH/objc_import.m
+++ b/test/PCH/objc_import.m
@@ -1,9 +1,9 @@
 // Test this without pch.
-// RUN: clang-cc -include %S/objc_import.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -include %S/objc_import.h -fsyntax-only -verify %s
 
 // Test with pch.
-// RUN: clang-cc -x objective-c -emit-pch -o %t %S/objc_import.h
-// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s 
+// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/objc_import.h
+// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s 
 
 #import "objc_import.h"
 
diff --git a/test/PCH/objc_methods.m b/test/PCH/objc_methods.m
index 136e39706c8..a60ffad4f2a 100644
--- a/test/PCH/objc_methods.m
+++ b/test/PCH/objc_methods.m
@@ -1,9 +1,9 @@
 // Test this without pch.
-// RUN: clang-cc -include %S/objc_methods.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -include %S/objc_methods.h -fsyntax-only -verify %s
 
 // Test with pch.
-// RUN: clang-cc -x objective-c -emit-pch -o %t %S/objc_methods.h
-// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s 
+// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/objc_methods.h
+// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s 
 
 void func() {
  TestPCH *xx;
diff --git a/test/PCH/objc_property.m b/test/PCH/objc_property.m
index 5992787fa42..17c3a729c5c 100644
--- a/test/PCH/objc_property.m
+++ b/test/PCH/objc_property.m
@@ -1,9 +1,9 @@
 // Test this without pch.
-// RUN: clang-cc -include %S/objc_property.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -include %S/objc_property.h -fsyntax-only -verify %s
 
 // Test with pch.
-// RUN: clang-cc -x objective-c -emit-pch -o %t %S/objc_property.h
-// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s 
+// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/objc_property.h
+// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s 
 
 void func() {
  TestProperties *xx = [TestProperties alloc];
diff --git a/test/Preprocessor/non_fragile_feature.m b/test/Preprocessor/non_fragile_feature.m
index cb6bc012f1c..dbf1f9a797e 100644
--- a/test/Preprocessor/non_fragile_feature.m
+++ b/test/Preprocessor/non_fragile_feature.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fobjc-nonfragile-abi %s
+// RUN: clang -cc1 -fobjc-nonfragile-abi %s
 #ifndef __has_feature
 #error Should have __has_feature
 #endif
diff --git a/test/Preprocessor/non_fragile_feature1.m b/test/Preprocessor/non_fragile_feature1.m
index 59f665b5464..5943e01b517 100644
--- a/test/Preprocessor/non_fragile_feature1.m
+++ b/test/Preprocessor/non_fragile_feature1.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple i386-unknown-unknown %s
+// RUN: clang -cc1 -triple i386-unknown-unknown %s
 #ifndef __has_feature
 #error Should have __has_feature
 #endif
diff --git a/test/Preprocessor/objc-pp.m b/test/Preprocessor/objc-pp.m
index 977789e38f1..9f375efec2c 100644
--- a/test/Preprocessor/objc-pp.m
+++ b/test/Preprocessor/objc-pp.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -fsyntax-only -verify -pedantic
+// RUN: clang -cc1 %s -fsyntax-only -verify -pedantic
 
 #import <stdint.h>  // no warning on #import in objc mode.
 
diff --git a/test/Sema/block-as-object.m b/test/Sema/block-as-object.m
index 219b1a06532..1197a1972fe 100644
--- a/test/Sema/block-as-object.m
+++ b/test/Sema/block-as-object.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -fsyntax-only -verify -fblocks
+// RUN: clang -cc1 %s -fsyntax-only -verify -fblocks
 
 @interface Whatever
 - copy;
diff --git a/test/Sema/rdar6248119.m b/test/Sema/rdar6248119.m
index 631c7b35a99..d4ee305c291 100644
--- a/test/Sema/rdar6248119.m
+++ b/test/Sema/rdar6248119.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only %s -verify
+// RUN: clang -cc1 -fsyntax-only %s -verify
 // Test case for: 
 //   <rdar://problem/6248119> @finally doesn't introduce a new scope
 
diff --git a/test/SemaTemplate/instantiate-function-1.mm b/test/SemaTemplate/instantiate-function-1.mm
index c119ab5da8b..aa4b941d39c 100644
--- a/test/SemaTemplate/instantiate-function-1.mm
+++ b/test/SemaTemplate/instantiate-function-1.mm
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify %s
+// RUN: clang -cc1 -fsyntax-only -verify %s
 // XFAIL: *
 
 template<typename T> struct Member0 {
diff --git a/test/SemaTemplate/instantiate-objc-1.mm b/test/SemaTemplate/instantiate-objc-1.mm
index 829acb2e199..093be4e2715 100644
--- a/test/SemaTemplate/instantiate-objc-1.mm
+++ b/test/SemaTemplate/instantiate-objc-1.mm
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify %s
+// RUN: clang -cc1 -fsyntax-only -verify %s
 
 // Obj-C string literal expressions
 template <typename T> struct StringTest {
-- 
GitLab