Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit eaed19e

Browse files
committedJun 16, 2011
[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
1 parent a586c74 commit eaed19e

36 files changed

+50
-69
lines changed
 

‎test/ARCMT/alloc-with-zone.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/alloc-with-zone.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/assign-prop-no-arc-runtime.m

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -fobjc-no-arc-runtime -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 > %t
3-
// RUN: diff %t %s.result
4-
// RUN: arcmt-test --args -arch x86_64 %s -miphoneos-version-min=4.3 > %t
5-
// RUN: diff %t %s.result
6-
// RUN: arcmt-test --args -arch x86_64 %s -mmacosx-version-min=10.6 > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only %s > %t
73
// RUN: diff %t %s.result
84

95
#include "Common.h"

‎test/ARCMT/assign-prop-no-arc-runtime.m.result

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -fobjc-no-arc-runtime -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 > %t
3-
// RUN: diff %t %s.result
4-
// RUN: arcmt-test --args -arch x86_64 %s -miphoneos-version-min=4.3 > %t
5-
// RUN: diff %t %s.result
6-
// RUN: arcmt-test --args -arch x86_64 %s -mmacosx-version-min=10.6 > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only %s > %t
73
// RUN: diff %t %s.result
84

95
#include "Common.h"

‎test/ARCMT/assign-prop-with-arc-runtime.m

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 > %t
3-
// RUN: diff %t %s.result
4-
// RUN: arcmt-test --args -arch x86_64 %s -miphoneos-version-min=5.0 > %t
5-
// RUN: diff %t %s.result
6-
// RUN: arcmt-test --args -arch x86_64 %s -mmacosx-version-min=10.7 > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fsyntax-only %s > %t
73
// RUN: diff %t %s.result
84

95
#include "Common.h"

‎test/ARCMT/assign-prop-with-arc-runtime.m.result

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 > %t
3-
// RUN: diff %t %s.result
4-
// RUN: arcmt-test --args -arch x86_64 %s -miphoneos-version-min=5.0 > %t
5-
// RUN: diff %t %s.result
6-
// RUN: arcmt-test --args -arch x86_64 %s -mmacosx-version-min=10.7 > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fsyntax-only %s > %t
73
// RUN: diff %t %s.result
84

95
#include "Common.h"

‎test/ARCMT/atautorelease-2.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface NSAutoreleasePool

‎test/ARCMT/atautorelease-2.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface NSAutoreleasePool

‎test/ARCMT/atautorelease-3.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface NSAutoreleasePool

‎test/ARCMT/atautorelease-3.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface NSAutoreleasePool

‎test/ARCMT/atautorelease.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/atautorelease.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/autoreleases.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
typedef unsigned char BOOL;

‎test/ARCMT/autoreleases.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
typedef unsigned char BOOL;

‎test/ARCMT/cxx-checking.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: arcmt-test -check-only -verify --args -Warc-abi %s
1+
// RUN: arcmt-test -check-only -verify --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fblocks -Warc-abi %s
22

33
// Classes that have an Objective-C object pointer.
44
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}}

‎test/ARCMT/dealloc.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface A

‎test/ARCMT/dealloc.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface A

‎test/ARCMT/init.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface NSObject

‎test/ARCMT/init.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface NSObject

‎test/ARCMT/nonobjc-to-objc-cast.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/nonobjc-to-objc-cast.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/releases.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
typedef int BOOL;

‎test/ARCMT/releases.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
typedef int BOOL;

‎test/ARCMT/remove-dealloc-method.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#define nil ((void*) 0)

‎test/ARCMT/remove-dealloc-method.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#define nil ((void*) 0)

‎test/ARCMT/remove-dealloc-zerouts.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface Foo

‎test/ARCMT/remove-dealloc-zerouts.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
@interface Foo

‎test/ARCMT/remove-statements.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/remove-statements.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/retains.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/retains.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fblocks -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/rewrite-block-var.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// 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
2-
// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 > %t
1+
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result
2+
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fblocks -fsyntax-only %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/rewrite-block-var.m.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// 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
2-
// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 > %t
1+
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result
2+
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fblocks -fsyntax-only %s > %t
33
// RUN: diff %t %s.result
44

55
#include "Common.h"

‎test/ARCMT/safe-arc-assign.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
void test12(id collection) {

‎test/ARCMT/safe-arc-assign.m.result

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
2-
// RUN: arcmt-test --args -arch x86_64 %s > %t
2+
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
33
// RUN: diff %t %s.result
44

55
void test12(id collection) {

‎tools/arcmt-test/arcmt-test.cpp

+13-16
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,20 @@ static bool checkForMigration(llvm::StringRef resourcesPath,
100100
Diags->setClient(verifyDiag);
101101
}
102102

103-
llvm::OwningPtr<CompilerInvocation> CI;
104-
CI.reset(clang::createInvocationFromCommandLine(Args, Diags));
105-
if (!CI)
106-
return true;
103+
CompilerInvocation CI;
104+
CompilerInvocation::CreateFromArgs(CI, Args.begin(), Args.end(), *Diags);
107105

108-
if (CI->getFrontendOpts().Inputs.empty()) {
106+
if (CI.getFrontendOpts().Inputs.empty()) {
109107
llvm::errs() << "error: no input files\n";
110108
return true;
111109
}
112110

113-
if (!CI->getLangOpts().ObjC1)
111+
if (!CI.getLangOpts().ObjC1)
114112
return false;
115113

116-
return arcmt::checkForManualIssues(*CI,
117-
CI->getFrontendOpts().Inputs[0].second,
118-
CI->getFrontendOpts().Inputs[0].first,
114+
return arcmt::checkForManualIssues(CI,
115+
CI.getFrontendOpts().Inputs[0].second,
116+
CI.getFrontendOpts().Inputs[0].first,
119117
Diags->getClient());
120118
}
121119

@@ -141,20 +139,19 @@ static bool performTransformations(llvm::StringRef resourcesPath,
141139
llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
142140
llvm::IntrusiveRefCntPtr<Diagnostic> TopDiags(new Diagnostic(DiagID, DiagClient));
143141

144-
llvm::OwningPtr<CompilerInvocation> origCI;
145-
origCI.reset(clang::createInvocationFromCommandLine(Args, TopDiags));
146-
if (!origCI)
147-
return true;
142+
CompilerInvocation origCI;
143+
CompilerInvocation::CreateFromArgs(origCI, Args.begin(), Args.end(),
144+
*TopDiags);
148145

149-
if (origCI->getFrontendOpts().Inputs.empty()) {
146+
if (origCI.getFrontendOpts().Inputs.empty()) {
150147
llvm::errs() << "error: no input files\n";
151148
return true;
152149
}
153150

154-
if (!origCI->getLangOpts().ObjC1)
151+
if (!origCI.getLangOpts().ObjC1)
155152
return false;
156153

157-
MigrationProcess migration(*origCI, DiagClient);
154+
MigrationProcess migration(origCI, DiagClient);
158155

159156
std::vector<TransformFn> transforms = arcmt::getAllTransformations();
160157
assert(!transforms.empty());

0 commit comments

Comments
 (0)
This repository has been archived.