From: Argyrios Kyrtzidis Date: Thu, 16 Jun 2011 02:41:46 +0000 (+0000) Subject: [arcmt] Fix tests in non-darwin. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0ba7fca71c3e1279dbf2ced8d1ba66eae37cbaf;p=clang [arcmt] Fix tests in non-darwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133140 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ARCMigrate/ARCMT.cpp b/lib/ARCMigrate/ARCMT.cpp index bb66da6a71..98e593c0fa 100644 --- a/lib/ARCMigrate/ARCMT.cpp +++ b/lib/ARCMigrate/ARCMT.cpp @@ -125,6 +125,11 @@ CompilerInvocation *createInvocationForMigration(CompilerInvocation &origCI) { llvm::Triple triple(CInvok->getTargetOpts().Triple); if (triple.getOS() == llvm::Triple::IOS || triple.getOS() == llvm::Triple::MacOSX) { + args.push_back("-ccc-host-triple"); + std::string forcedTriple = triple.getArchName(); + forcedTriple += "-apple-darwin10"; + args.push_back(forcedTriple); + unsigned Major, Minor, Micro; triple.getOSVersion(Major, Minor, Micro); llvm::SmallString<100> flag; diff --git a/test/ARCMT/assign-prop-with-arc-runtime.m b/test/ARCMT/assign-prop-with-arc-runtime.m index b77b61ba46..49c25a7a62 100644 --- a/test/ARCMT/assign-prop-with-arc-runtime.m +++ b/test/ARCMT/assign-prop-with-arc-runtime.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 -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fsyntax-only %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -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 c5e5854e9a..88b41de5b6 100644 --- a/test/ARCMT/assign-prop-with-arc-runtime.m.result +++ b/test/ARCMT/assign-prop-with-arc-runtime.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 -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fsyntax-only %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fobjc-nonfragile-abi -fsyntax-only %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 76f5d5092b..8053cfe773 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 -// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fblocks -fsyntax-only %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -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 ac220ad2a7..a2fa56d784 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 -// RUN: arcmt-test --args -triple x86_64-apple-macosx10.8 -fobjc-nonfragile-abi -fblocks -fsyntax-only %s > %t +// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fobjc-nonfragile-abi -fblocks -fsyntax-only %s > %t // RUN: diff %t %s.result #include "Common.h"