[cfe-commits] r72108 - in /cfe/trunk: 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

Eli Friedman eli.friedman at gmail.com
Tue May 19 04:12:44 PDT 2009


Author: efriedma
Date: Tue May 19 06:12:40 2009
New Revision: 72108

URL: http://llvm.org/viewvc/llvm-project?rev=72108&view=rev
Log:
Remove the -arch option from clang-cc: for all practical purposes, it's 
redundant with -triple.


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

Modified: cfe/trunk/test/Analysis/NSString.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/NSString.m?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/NSString.m (original)
+++ cfe/trunk/test/Analysis/NSString.m Tue May 19 06:12:40 2009
@@ -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

Modified: cfe/trunk/test/CodeGen/asm-2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/asm-2.c?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/asm-2.c (original)
+++ cfe/trunk/test/CodeGen/asm-2.c Tue May 19 06:12:40 2009
@@ -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 @@
   
   asm("xyz" :"=a"(a), "=d"(b) : "a"(data));
   return a + b;
-}
\ No newline at end of file
+}

Modified: cfe/trunk/test/CodeGen/builtin-memfns.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtin-memfns.c?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/builtin-memfns.c (original)
+++ cfe/trunk/test/CodeGen/builtin-memfns.c Tue May 19 06:12:40 2009
@@ -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 &&

Modified: cfe/trunk/test/CodeGen/const-init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/const-init.c?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/const-init.c (original)
+++ cfe/trunk/test/CodeGen/const-init.c Tue May 19 06:12:40 2009
@@ -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>
 

Modified: cfe/trunk/test/CodeGen/global-decls.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/global-decls.c?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/global-decls.c (original)
+++ cfe/trunk/test/CodeGen/global-decls.c Tue May 19 06:12:40 2009
@@ -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));

Modified: cfe/trunk/test/CodeGen/mangle.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mangle.c?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/mangle.c (original)
+++ cfe/trunk/test/CodeGen/mangle.c Tue May 19 06:12:40 2009
@@ -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 &&
 

Modified: cfe/trunk/test/CodeGen/staticinit.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/staticinit.c?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/staticinit.c (original)
+++ cfe/trunk/test/CodeGen/staticinit.c Tue May 19 06:12:40 2009
@@ -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 { 

Modified: cfe/trunk/test/Sema/asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/asm.c?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/Sema/asm.c (original)
+++ cfe/trunk/test/Sema/asm.c Tue May 19 06:12:40 2009
@@ -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;

Modified: cfe/trunk/test/Sema/designated-initializers.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/designated-initializers.c?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/Sema/designated-initializers.c (original)
+++ cfe/trunk/test/Sema/designated-initializers.c Tue May 19 06:12:40 2009
@@ -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 };
 

Modified: cfe/trunk/test/Sema/static-init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/static-init.c?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/Sema/static-init.c (original)
+++ cfe/trunk/test/Sema/static-init.c Tue May 19 06:12:40 2009
@@ -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>
 

Modified: cfe/trunk/test/SemaObjC/interface-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/interface-1.m?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/interface-1.m (original)
+++ cfe/trunk/test/SemaObjC/interface-1.m Tue May 19 06:12:40 2009
@@ -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 :

Modified: cfe/trunk/tools/clang-cc/clang-cc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang-cc.cpp?rev=72108&r1=72107&r2=72108&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Tue May 19 06:12:40 2009
@@ -858,9 +858,6 @@
   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 @@
   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





More information about the cfe-commits mailing list