Skip to content

Commit 08f1ebb

Browse files
committed
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. llvm-svn: 164460
1 parent 23b5b17 commit 08f1ebb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

clang/lib/Driver/ToolChains.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ Tool &Generic_GCC::SelectTool(const Compilation &C,
14161416
bool Generic_GCC::IsUnwindTablesDefault() const {
14171417
// FIXME: Gross; we should probably have some separate target
14181418
// definition, possibly even reusing the one in clang.
1419-
return getArchName() == "x86_64";
1419+
return getArch() == llvm::Triple::x86_64;
14201420
}
14211421

14221422
const char *Generic_GCC::GetDefaultRelocationModel() const {

clang/test/Driver/clang-translation.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,10 @@
9191
// PPCE5500: "-cc1"
9292
// PPCE5500: "-target-cpu" "e5500"
9393

94+
// RUN: %clang -target amd64-unknown-openbsd5.2 -### -S %s 2>&1 | \
95+
// RUN: FileCheck -check-prefix=AMD64 %s
96+
// AMD64: clang
97+
// AMD64: "-cc1"
98+
// AMD64: "-triple"
99+
// AMD64: "amd64-unknown-openbsd5.2"
100+
// AMD64: "-munwind-tables"

0 commit comments

Comments
 (0)