aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Analysis/NSString.m8
-rw-r--r--test/CodeGen/asm-2.c4
-rw-r--r--test/CodeGen/builtin-memfns.c2
-rw-r--r--test/CodeGen/const-init.c2
-rw-r--r--test/CodeGen/global-decls.c2
-rw-r--r--test/CodeGen/mangle.c2
-rw-r--r--test/CodeGen/staticinit.c2
-rw-r--r--test/Sema/asm.c2
-rw-r--r--test/Sema/designated-initializers.c2
-rw-r--r--test/Sema/static-init.c2
-rw-r--r--test/SemaObjC/interface-1.m2
-rw-r--r--tools/clang-cc/clang-cc.cpp27
12 files changed, 15 insertions, 42 deletions
diff --git a/test/Analysis/NSString.m b/test/Analysis/NSString.m
index 44d0a5d962..b707071990 100644
--- a/test/Analysis/NSString.m
+++ b/test/Analysis/NSString.m
@@ -1,9 +1,9 @@
-// RUN: clang-cc -arch i386 -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang-cc -arch i386 -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s
+// RUN: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s
-// NOTWORK: clang-cc -arch i386 -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// NOTWORK: clang-cc -arch i386 -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
+// NOTWORK: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// NOTWORK: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
//===----------------------------------------------------------------------===//
// The following code is reduced using delta-debugging from
diff --git a/test/CodeGen/asm-2.c b/test/CodeGen/asm-2.c
index a58a781e72..f5b378eb10 100644
--- a/test/CodeGen/asm-2.c
+++ b/test/CodeGen/asm-2.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -emit-llvm %s -o %t -arch=i386 -O2 &&
+// RUN: clang-cc -emit-llvm %s -o %t -triple i386-pc-linux-gnu -O2 &&
// RUN: not grep "load" %t
// <rdar://problem/6841383>
@@ -7,4 +7,4 @@ int cpuid(unsigned data) {
asm("xyz" :"=a"(a), "=d"(b) : "a"(data));
return a + b;
-} \ No newline at end of file
+}
diff --git a/test/CodeGen/builtin-memfns.c b/test/CodeGen/builtin-memfns.c
index e9e239624e..9ae380c545 100644
--- a/test/CodeGen/builtin-memfns.c
+++ b/test/CodeGen/builtin-memfns.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -arch i386 -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s &&
// RUN: grep '@llvm.memset.i32' %t &&
// RUN: grep '@llvm.memcpy.i32' %t &&
// RUN: grep '@llvm.memmove.i32' %t &&
diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c
index 1f9d74c7e9..0364cc153f 100644
--- a/test/CodeGen/const-init.c
+++ b/test/CodeGen/const-init.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -arch i386 -verify -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-pc-linux-gnu -verify -emit-llvm -o %t %s &&
#include <stdint.h>
diff --git a/test/CodeGen/global-decls.c b/test/CodeGen/global-decls.c
index f08a7dc13f..80222ea85e 100644
--- a/test/CodeGen/global-decls.c
+++ b/test/CodeGen/global-decls.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -arch i386 -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s &&
// RUN: grep '@g0_ext = extern_weak global i32' %t &&
extern int g0_ext __attribute__((weak));
diff --git a/test/CodeGen/mangle.c b/test/CodeGen/mangle.c
index b3affe9469..17d74ba71f 100644
--- a/test/CodeGen/mangle.c
+++ b/test/CodeGen/mangle.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -arch i386 -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s &&
// RUN: grep '@_Z2f0i' %t &&
// RUN: grep '@_Z2f0l' %t &&
diff --git a/test/CodeGen/staticinit.c b/test/CodeGen/staticinit.c
index fa3e736d31..91fcdcf69f 100644
--- a/test/CodeGen/staticinit.c
+++ b/test/CodeGen/staticinit.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -arch i386 -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s &&
// RUN: grep "g.b = internal global i8. getelementptr" %t &&
struct AStruct {
diff --git a/test/Sema/asm.c b/test/Sema/asm.c
index cc25fd89b0..0a62545a1e 100644
--- a/test/Sema/asm.c
+++ b/test/Sema/asm.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -arch=i386 -verify -fsyntax-only
+// RUN: clang-cc %s -triple i386-pc-linux-gnu -verify -fsyntax-only
void f() {
int i;
diff --git a/test/Sema/designated-initializers.c b/test/Sema/designated-initializers.c
index 3333122202..ae951d42a1 100644
--- a/test/Sema/designated-initializers.c
+++ b/test/Sema/designated-initializers.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify -arch x86_64 %s
+// RUN: clang-cc -fsyntax-only -verify -triple x86_64-unknown-unknown %s
int complete_array_from_init[] = { 1, 2, [10] = 5, 1, 2, [5] = 2, 6 };
diff --git a/test/Sema/static-init.c b/test/Sema/static-init.c
index 99905f0557..cd495568ca 100644
--- a/test/Sema/static-init.c
+++ b/test/Sema/static-init.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -arch i386 -fsyntax-only -verify %s
+// RUN: clang-cc -triple i386-pc-linux-gnu -fsyntax-only -verify %s
#include <stdint.h>
diff --git a/test/SemaObjC/interface-1.m b/test/SemaObjC/interface-1.m
index 40734ba800..85a2a91a8c 100644
--- a/test/SemaObjC/interface-1.m
+++ b/test/SemaObjC/interface-1.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -arch i386-apple-darwin9 %s -fsyntax-only -verify
+// RUN: clang-cc -triple i386-apple-darwin9 %s -fsyntax-only -verify
// rdar://5957506
@interface NSWhatever :
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp
index 8b665a34c4..e4888f88c8 100644
--- a/tools/clang-cc/clang-cc.cpp
+++ b/tools/clang-cc/clang-cc.cpp
@@ -858,9 +858,6 @@ TargetTriple("triple",
llvm::cl::desc("Specify target triple (e.g. i686-apple-darwin9)"));
static llvm::cl::opt<std::string>
-Arch("arch", llvm::cl::desc("Specify target architecture (e.g. i686)"));
-
-static llvm::cl::opt<std::string>
MacOSVersionMin("mmacosx-version-min",
llvm::cl::desc("Specify target Mac OS X version (e.g. 10.5)"));
@@ -987,30 +984,6 @@ static std::string CreateTargetTriple() {
std::string Triple = TargetTriple;
if (Triple.empty())
Triple = llvm::sys::getHostTriple();
-
- // If -arch foo was specified, remove the architecture from the triple we have
- // so far and replace it with the specified one.
-
- // FIXME: -arch should be removed, the driver should handle this.
- if (!Arch.empty()) {
- // Decompose the base triple into "arch" and suffix.
- std::string::size_type FirstDashIdx = Triple.find('-');
-
- if (FirstDashIdx == std::string::npos) {
- fprintf(stderr,
- "Malformed target triple: \"%s\" ('-' could not be found).\n",
- Triple.c_str());
- exit(1);
- }
-
- // Canonicalize -arch ppc to add "powerpc" to the triple, not ppc.
- if (Arch == "ppc")
- Arch = "powerpc";
- else if (Arch == "ppc64")
- Arch = "powerpc64";
-
- Triple = Arch + std::string(Triple.begin()+FirstDashIdx, Triple.end());
- }
// If -mmacosx-version-min=10.3.9 is specified, change the triple from being
// something like powerpc-apple-darwin9 to powerpc-apple-darwin7