-// 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
-// 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>
asm("xyz" :"=a"(a), "=d"(b) : "a"(data));
return a + b;
-}
\ No newline at end of file
+}
-// 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 &&
-// 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>
-// 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));
-// 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 &&
-// 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 {
-// 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;
-// 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 };
-// RUN: clang-cc -arch i386 -fsyntax-only -verify %s
+// RUN: clang-cc -triple i386-pc-linux-gnu -fsyntax-only -verify %s
#include <stdint.h>
-// 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 :
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)"));
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