]> granicus.if.org Git - clang/commitdiff
Fix pr13749. There is still a lot of code using getArchName that should be
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 22 Sep 2012 15:04:11 +0000 (15:04 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 22 Sep 2012 15:04:11 +0000 (15:04 +0000)
using getArch, but I will try to fix them one at time to add tests.

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

lib/Driver/ToolChains.cpp
test/Driver/clang-translation.c

index 2517b3093f8def50f93ed1b871f086a715c793b6..d7eaed122dfdc3073a6767186eff8a50d29dad15 100644 (file)
@@ -1416,7 +1416,7 @@ Tool &Generic_GCC::SelectTool(const Compilation &C,
 bool Generic_GCC::IsUnwindTablesDefault() const {
   // FIXME: Gross; we should probably have some separate target
   // definition, possibly even reusing the one in clang.
-  return getArchName() == "x86_64";
+  return getArch() == llvm::Triple::x86_64;
 }
 
 const char *Generic_GCC::GetDefaultRelocationModel() const {
index 6f300398142453260e448391ea6a44fe4e042a0d..699510faa21d4ba993e0bfdd0464a565b8621048 100644 (file)
 // PPCE5500: "-cc1"
 // PPCE5500: "-target-cpu" "e5500"
 
+// RUN: %clang -target amd64-unknown-openbsd5.2 -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=AMD64 %s
+// AMD64: clang
+// AMD64: "-cc1"
+// AMD64: "-triple"
+// AMD64: "amd64-unknown-openbsd5.2"
+// AMD64: "-munwind-tables"