From: Argyrios Kyrtzidis Date: Thu, 16 Jun 2011 00:53:46 +0000 (+0000) Subject: [arcmt] Make arcmt-test accept cc1 options to make it more portable and hopefully... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eaed19e241359fb37da0269a64311e57cd53b83c;p=clang [arcmt] Make arcmt-test accept cc1 options to make it more portable and hopefully fix MSVC failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133119 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/ARCMT/alloc-with-zone.m b/test/ARCMT/alloc-with-zone.m index b8b78d1ed4..52d278ac94 100644 --- a/test/ARCMT/alloc-with-zone.m +++ b/test/ARCMT/alloc-with-zone.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/alloc-with-zone.m.result b/test/ARCMT/alloc-with-zone.m.result index 52daed619e..a9977339e5 100644 --- a/test/ARCMT/alloc-with-zone.m.result +++ b/test/ARCMT/alloc-with-zone.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/assign-prop-no-arc-runtime.m b/test/ARCMT/assign-prop-no-arc-runtime.m index 07a5b40b6f..83c0107682 100644 --- a/test/ARCMT/assign-prop-no-arc-runtime.m +++ b/test/ARCMT/assign-prop-no-arc-runtime.m @@ -1,9 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -fobjc-no-arc-runtime -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 > %t -// RUN: diff %t %s.result -// RUN: arcmt-test --args -arch x86_64 %s -miphoneos-version-min=4.3 > %t -// RUN: diff %t %s.result -// RUN: arcmt-test --args -arch x86_64 %s -mmacosx-version-min=10.6 > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/assign-prop-no-arc-runtime.m.result b/test/ARCMT/assign-prop-no-arc-runtime.m.result index 69909f3416..f5a33c582b 100644 --- a/test/ARCMT/assign-prop-no-arc-runtime.m.result +++ b/test/ARCMT/assign-prop-no-arc-runtime.m.result @@ -1,9 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -fobjc-no-arc-runtime -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 > %t -// RUN: diff %t %s.result -// RUN: arcmt-test --args -arch x86_64 %s -miphoneos-version-min=4.3 > %t -// RUN: diff %t %s.result -// RUN: arcmt-test --args -arch x86_64 %s -mmacosx-version-min=10.6 > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/assign-prop-with-arc-runtime.m b/test/ARCMT/assign-prop-with-arc-runtime.m index 86f5fbb616..b77b61ba46 100644 --- a/test/ARCMT/assign-prop-with-arc-runtime.m +++ b/test/ARCMT/assign-prop-with-arc-runtime.m @@ -1,9 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 > %t -// RUN: diff %t %s.result -// RUN: arcmt-test --args -arch x86_64 %s -miphoneos-version-min=5.0 > %t -// RUN: diff %t %s.result -// RUN: arcmt-test --args -arch x86_64 %s -mmacosx-version-min=10.7 > %t +// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fsyntax-only %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/assign-prop-with-arc-runtime.m.result b/test/ARCMT/assign-prop-with-arc-runtime.m.result index 59f7608278..c5e5854e9a 100644 --- a/test/ARCMT/assign-prop-with-arc-runtime.m.result +++ b/test/ARCMT/assign-prop-with-arc-runtime.m.result @@ -1,9 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 > %t -// RUN: diff %t %s.result -// RUN: arcmt-test --args -arch x86_64 %s -miphoneos-version-min=5.0 > %t -// RUN: diff %t %s.result -// RUN: arcmt-test --args -arch x86_64 %s -mmacosx-version-min=10.7 > %t +// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fsyntax-only %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/atautorelease-2.m b/test/ARCMT/atautorelease-2.m index 919e10edf2..5d29772277 100644 --- a/test/ARCMT/atautorelease-2.m +++ b/test/ARCMT/atautorelease-2.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface NSAutoreleasePool diff --git a/test/ARCMT/atautorelease-2.m.result b/test/ARCMT/atautorelease-2.m.result index 7a55cb43ae..7bb164723e 100644 --- a/test/ARCMT/atautorelease-2.m.result +++ b/test/ARCMT/atautorelease-2.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface NSAutoreleasePool diff --git a/test/ARCMT/atautorelease-3.m b/test/ARCMT/atautorelease-3.m index 4498908472..5d71c33b6b 100644 --- a/test/ARCMT/atautorelease-3.m +++ b/test/ARCMT/atautorelease-3.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface NSAutoreleasePool diff --git a/test/ARCMT/atautorelease-3.m.result b/test/ARCMT/atautorelease-3.m.result index 51b0e570b6..682118e82f 100644 --- a/test/ARCMT/atautorelease-3.m.result +++ b/test/ARCMT/atautorelease-3.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface NSAutoreleasePool diff --git a/test/ARCMT/atautorelease.m b/test/ARCMT/atautorelease.m index fa1a24b916..bdf77197a8 100644 --- a/test/ARCMT/atautorelease.m +++ b/test/ARCMT/atautorelease.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/atautorelease.m.result b/test/ARCMT/atautorelease.m.result index 8cd649aba9..ccce1bd875 100644 --- a/test/ARCMT/atautorelease.m.result +++ b/test/ARCMT/atautorelease.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/autoreleases.m b/test/ARCMT/autoreleases.m index 284d92773d..a12db8178f 100644 --- a/test/ARCMT/autoreleases.m +++ b/test/ARCMT/autoreleases.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result typedef unsigned char BOOL; diff --git a/test/ARCMT/autoreleases.m.result b/test/ARCMT/autoreleases.m.result index fb2959fa90..796bfbb9d6 100644 --- a/test/ARCMT/autoreleases.m.result +++ b/test/ARCMT/autoreleases.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result typedef unsigned char BOOL; diff --git a/test/ARCMT/cxx-checking.mm b/test/ARCMT/cxx-checking.mm index cf47bba0c6..667138c974 100644 --- a/test/ARCMT/cxx-checking.mm +++ b/test/ARCMT/cxx-checking.mm @@ -1,4 +1,4 @@ -// RUN: arcmt-test -check-only -verify --args -Warc-abi %s +// RUN: arcmt-test -check-only -verify --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fblocks -Warc-abi %s // Classes that have an Objective-C object pointer. struct HasObjectMember0 { // expected-warning{{'HasObjectMember0' cannot be shared between ARC and non-ARC code; add a copy constructor, a copy assignment operator, and a destructor to make it ABI-compatible}} diff --git a/test/ARCMT/dealloc.m b/test/ARCMT/dealloc.m index 6166c426fd..dac964403f 100644 --- a/test/ARCMT/dealloc.m +++ b/test/ARCMT/dealloc.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface A diff --git a/test/ARCMT/dealloc.m.result b/test/ARCMT/dealloc.m.result index 445d91a8b7..24756d2548 100644 --- a/test/ARCMT/dealloc.m.result +++ b/test/ARCMT/dealloc.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface A diff --git a/test/ARCMT/init.m b/test/ARCMT/init.m index 419288c355..f0d24f60e1 100644 --- a/test/ARCMT/init.m +++ b/test/ARCMT/init.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface NSObject diff --git a/test/ARCMT/init.m.result b/test/ARCMT/init.m.result index 9142c37a2f..4f3b4e724e 100644 --- a/test/ARCMT/init.m.result +++ b/test/ARCMT/init.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface NSObject diff --git a/test/ARCMT/nonobjc-to-objc-cast.m b/test/ARCMT/nonobjc-to-objc-cast.m index 1fbe73f359..4ca47f2259 100644 --- a/test/ARCMT/nonobjc-to-objc-cast.m +++ b/test/ARCMT/nonobjc-to-objc-cast.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/nonobjc-to-objc-cast.m.result b/test/ARCMT/nonobjc-to-objc-cast.m.result index 856b80f8d9..f7127b7192 100644 --- a/test/ARCMT/nonobjc-to-objc-cast.m.result +++ b/test/ARCMT/nonobjc-to-objc-cast.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/releases.m b/test/ARCMT/releases.m index ddcdf93f32..f49cb7e7b9 100644 --- a/test/ARCMT/releases.m +++ b/test/ARCMT/releases.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result typedef int BOOL; diff --git a/test/ARCMT/releases.m.result b/test/ARCMT/releases.m.result index b502cbb91d..48b3ba202f 100644 --- a/test/ARCMT/releases.m.result +++ b/test/ARCMT/releases.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result typedef int BOOL; diff --git a/test/ARCMT/remove-dealloc-method.m b/test/ARCMT/remove-dealloc-method.m index 7689bc0a13..5c2d785ba7 100644 --- a/test/ARCMT/remove-dealloc-method.m +++ b/test/ARCMT/remove-dealloc-method.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #define nil ((void*) 0) diff --git a/test/ARCMT/remove-dealloc-method.m.result b/test/ARCMT/remove-dealloc-method.m.result index d423243a8f..88d94e305e 100644 --- a/test/ARCMT/remove-dealloc-method.m.result +++ b/test/ARCMT/remove-dealloc-method.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #define nil ((void*) 0) diff --git a/test/ARCMT/remove-dealloc-zerouts.m b/test/ARCMT/remove-dealloc-zerouts.m index 7bd00a3618..3ba85f1edc 100644 --- a/test/ARCMT/remove-dealloc-zerouts.m +++ b/test/ARCMT/remove-dealloc-zerouts.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface Foo diff --git a/test/ARCMT/remove-dealloc-zerouts.m.result b/test/ARCMT/remove-dealloc-zerouts.m.result index ba93b3f088..03a426df9b 100644 --- a/test/ARCMT/remove-dealloc-zerouts.m.result +++ b/test/ARCMT/remove-dealloc-zerouts.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result @interface Foo diff --git a/test/ARCMT/remove-statements.m b/test/ARCMT/remove-statements.m index 6fb08a7cc2..c433ec9913 100644 --- a/test/ARCMT/remove-statements.m +++ b/test/ARCMT/remove-statements.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/remove-statements.m.result b/test/ARCMT/remove-statements.m.result index ab3390f9e8..9a1153e287 100644 --- a/test/ARCMT/remove-statements.m.result +++ b/test/ARCMT/remove-statements.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/retains.m b/test/ARCMT/retains.m index c251f88682..d7938376ab 100644 --- a/test/ARCMT/retains.m +++ b/test/ARCMT/retains.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/retains.m.result b/test/ARCMT/retains.m.result index b8f625a91c..a24b42c876 100644 --- a/test/ARCMT/retains.m.result +++ b/test/ARCMT/retains.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/rewrite-block-var.m b/test/ARCMT/rewrite-block-var.m index 70da6786c0..76f5d5092b 100644 --- a/test/ARCMT/rewrite-block-var.m +++ b/test/ARCMT/rewrite-block-var.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 > %t +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result +// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fblocks -fsyntax-only %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/rewrite-block-var.m.result b/test/ARCMT/rewrite-block-var.m.result index a37e6af5c4..ac220ad2a7 100644 --- a/test/ARCMT/rewrite-block-var.m.result +++ b/test/ARCMT/rewrite-block-var.m.result @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 > %t +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result +// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fblocks -fsyntax-only %s > %t // RUN: diff %t %s.result #include "Common.h" diff --git a/test/ARCMT/safe-arc-assign.m b/test/ARCMT/safe-arc-assign.m index 2b8f93e51b..368c2b6639 100644 --- a/test/ARCMT/safe-arc-assign.m +++ b/test/ARCMT/safe-arc-assign.m @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result void test12(id collection) { diff --git a/test/ARCMT/safe-arc-assign.m.result b/test/ARCMT/safe-arc-assign.m.result index eac3d62eb1..cacd1093c5 100644 --- a/test/ARCMT/safe-arc-assign.m.result +++ b/test/ARCMT/safe-arc-assign.m.result @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result -// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t // RUN: diff %t %s.result void test12(id collection) { diff --git a/tools/arcmt-test/arcmt-test.cpp b/tools/arcmt-test/arcmt-test.cpp index a5a7125f1e..baa3f568c0 100644 --- a/tools/arcmt-test/arcmt-test.cpp +++ b/tools/arcmt-test/arcmt-test.cpp @@ -100,22 +100,20 @@ static bool checkForMigration(llvm::StringRef resourcesPath, Diags->setClient(verifyDiag); } - llvm::OwningPtr CI; - CI.reset(clang::createInvocationFromCommandLine(Args, Diags)); - if (!CI) - return true; + CompilerInvocation CI; + CompilerInvocation::CreateFromArgs(CI, Args.begin(), Args.end(), *Diags); - if (CI->getFrontendOpts().Inputs.empty()) { + if (CI.getFrontendOpts().Inputs.empty()) { llvm::errs() << "error: no input files\n"; return true; } - if (!CI->getLangOpts().ObjC1) + if (!CI.getLangOpts().ObjC1) return false; - return arcmt::checkForManualIssues(*CI, - CI->getFrontendOpts().Inputs[0].second, - CI->getFrontendOpts().Inputs[0].first, + return arcmt::checkForManualIssues(CI, + CI.getFrontendOpts().Inputs[0].second, + CI.getFrontendOpts().Inputs[0].first, Diags->getClient()); } @@ -141,20 +139,19 @@ static bool performTransformations(llvm::StringRef resourcesPath, llvm::IntrusiveRefCntPtr DiagID(new DiagnosticIDs()); llvm::IntrusiveRefCntPtr TopDiags(new Diagnostic(DiagID, DiagClient)); - llvm::OwningPtr origCI; - origCI.reset(clang::createInvocationFromCommandLine(Args, TopDiags)); - if (!origCI) - return true; + CompilerInvocation origCI; + CompilerInvocation::CreateFromArgs(origCI, Args.begin(), Args.end(), + *TopDiags); - if (origCI->getFrontendOpts().Inputs.empty()) { + if (origCI.getFrontendOpts().Inputs.empty()) { llvm::errs() << "error: no input files\n"; return true; } - if (!origCI->getLangOpts().ObjC1) + if (!origCI.getLangOpts().ObjC1) return false; - MigrationProcess migration(*origCI, DiagClient); + MigrationProcess migration(origCI, DiagClient); std::vector transforms = arcmt::getAllTransformations(); assert(!transforms.empty());