From 6f009b68b9f7aaf280144b0cd81d6a0b23c733a6 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 22 Sep 2012 15:04:11 +0000 Subject: [PATCH] Fix pr13749. There is still a lot of code using getArchName that should be 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 | 2 +- test/Driver/clang-translation.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 2517b3093f..d7eaed122d 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -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 { diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c index 6f30039814..699510faa2 100644 --- a/test/Driver/clang-translation.c +++ b/test/Driver/clang-translation.c @@ -91,3 +91,10 @@ // 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" -- 2.40.0