]> granicus.if.org Git - clang/commitdiff
Remove the -arch option from clang-cc: for all practical purposes, it's
authorEli Friedman <eli.friedman@gmail.com>
Tue, 19 May 2009 11:12:40 +0000 (11:12 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 19 May 2009 11:12:40 +0000 (11:12 +0000)
redundant with -triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72108 91177308-0d34-0410-b5e6-96231b3b80d8

12 files changed:
test/Analysis/NSString.m
test/CodeGen/asm-2.c
test/CodeGen/builtin-memfns.c
test/CodeGen/const-init.c
test/CodeGen/global-decls.c
test/CodeGen/mangle.c
test/CodeGen/staticinit.c
test/Sema/asm.c
test/Sema/designated-initializers.c
test/Sema/static-init.c
test/SemaObjC/interface-1.m
tools/clang-cc/clang-cc.cpp

index 44d0a5d962df67ff2458b95e3f70e26c402169a9..b707071990f858ad5ed62421ef1cf6f9c02b6cc9 100644 (file)
@@ -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
index a58a781e72be1919c6cc0540e57b5ba7e7a6ecb3..f5b378eb101704c40dc9ee008a9af596f0fae478 100644 (file)
@@ -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
+}
index e9e239624e65d7d05019d9312ced9ebf7a21b883..9ae380c5455be416d881aaa334b4199c21222c7d 100644 (file)
@@ -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 &&
index 1f9d74c7e9fd1d67ad4bd336c0430e35546d732a..0364cc153ff867ae8990c487779fee8b4eebae52 100644 (file)
@@ -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>
 
index f08a7dc13fd90f2ffb7c2a38a0abe86b22a826db..80222ea85ef12942e6bb9d52be2e5dd4d9885f00 100644 (file)
@@ -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));
index b3affe9469569438c68b73f4f0a33b220f083db6..17d74ba71f0c55f55d0319c4eec9df3eb2fdd2e5 100644 (file)
@@ -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 &&
 
index fa3e736d31fe8069ee9be6c974511fb77062ad6f..91fcdcf69f00a7e8895c67f175a61255e40d46da 100644 (file)
@@ -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 { 
index cc25fd89b0c256ae4842efb04b295bd2a5ce720b..0a62545a1e084a41ae38cf3956791479d81785c5 100644 (file)
@@ -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;
index 3333122202a38795285dc05bab07e603086d8409..ae951d42a1a60cefd1ecf6b64eea6cd2e6673c08 100644 (file)
@@ -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 };
 
index 99905f05574aa4d97cd405a401cf4f68a7741ea4..cd495568ca3f32759bcaf68136892e60bda7748b 100644 (file)
@@ -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>
 
index 40734ba800ee7fa73f4f8d234b8b23df721c79d4..85a2a91a8c13b4c8a4f851559fe4f59cc057249e 100644 (file)
@@ -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 :
index 8b665a34c4e4bdc8379d438a922791cb5b55b89a..e4888f88c80ef414bc34c343ca42ab1458b1fe61 100644 (file)
@@ -857,9 +857,6 @@ static llvm::cl::opt<std::string>
 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