[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 b8b78d1..52d278a 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 52daed6..a997733 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 07a5b40..83c0107 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 69909f3..f5a33c5 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 86f5fbb..b77b61b 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 59f7608..c5e5854 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 919e10e..5d29772 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 7a55cb4..7bb1647 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 4498908..5d71c33 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 51b0e57..682118e 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 fa1a24b..bdf7719 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 8cd649a..ccce1bd 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 284d927..a12db81 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 fb2959f..796bfbb 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 cf47bba..667138c 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 6166c42..dac9644 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 445d91a..24756d2 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 419288c..f0d24f6 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 9142c37..4f3b4e7 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 1fbe73f..4ca47f2 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 856b80f..f7127b7 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 ddcdf93..f49cb7e 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 b502cbb..48b3ba2 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 7689bc0..5c2d785 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 d423243..88d94e3 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 7bd00a3..3ba85f1 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 ba93b3f..03a426d 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 6fb08a7..c433ec9 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 ab3390f..9a1153e 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 c251f88..d793837 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 b8f625a..a24b42c 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 70da6786..76f5d50 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 a37e6af..ac220ad 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 2b8f93e..368c2b6 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 eac3d62..cacd109 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 a5a7125..baa3f56 100644
--- a/tools/arcmt-test/arcmt-test.cpp
+++ b/tools/arcmt-test/arcmt-test.cpp
@@ -100,22 +100,20 @@
     Diags->setClient(verifyDiag);
   }
 
-  llvm::OwningPtr<CompilerInvocation> 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 @@
   llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
   llvm::IntrusiveRefCntPtr<Diagnostic> TopDiags(new Diagnostic(DiagID, DiagClient));
 
-  llvm::OwningPtr<CompilerInvocation> 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<TransformFn> transforms = arcmt::getAllTransformations();
   assert(!transforms.empty());