[cfe-commits] r165368 - in /cfe/trunk: lib/Driver/ToolChains.cpp lib/Driver/WindowsToolChain.cpp test/Driver/clang-translation.c
Rafael Espindola
rafael.espindola at gmail.com
Sat Oct 6 20:23:41 PDT 2012
Author: rafael
Date: Sat Oct 6 22:23:40 2012
New Revision: 165368
URL: http://llvm.org/viewvc/llvm-project?rev=165368&view=rev
Log:
Use getArch instead of getArchName.
The darwin change should be a nop since Triple::getArchTypeForDarwinArchName
doesn't know about amd64.
If things like amd64-mingw32 are to be rejected, we should print a error
earlier on instead of silently using the wrong abi.
Remove old comment that looks out of place, this is "in clang".
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/WindowsToolChain.cpp
cfe/trunk/test/Driver/clang-translation.c
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=165368&r1=165367&r2=165368&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Sat Oct 6 22:23:40 2012
@@ -955,9 +955,7 @@
}
bool Darwin::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;
}
bool Darwin::UseDwarfDebugFlags() const {
@@ -1457,8 +1455,6 @@
}
bool Generic_GCC::IsUnwindTablesDefault() const {
- // FIXME: Gross; we should probably have some separate target
- // definition, possibly even reusing the one in clang.
return getArch() == llvm::Triple::x86_64;
}
Modified: cfe/trunk/lib/Driver/WindowsToolChain.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/WindowsToolChain.cpp?rev=165368&r1=165367&r2=165368&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/WindowsToolChain.cpp (original)
+++ cfe/trunk/lib/Driver/WindowsToolChain.cpp Sat Oct 6 22:23:40 2012
@@ -81,9 +81,7 @@
}
bool Windows::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 *Windows::GetDefaultRelocationModel() const {
Modified: cfe/trunk/test/Driver/clang-translation.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=165368&r1=165367&r2=165368&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang-translation.c (original)
+++ cfe/trunk/test/Driver/clang-translation.c Sat Oct 6 22:23:40 2012
@@ -91,3 +91,11 @@
// AMD64: "-triple"
// AMD64: "amd64-unknown-openbsd5.2"
// AMD64: "-munwind-tables"
+
+// RUN: %clang -target amd64--mingw32 -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=AMD64-MINGW %s
+// AMD64-MINGW: clang
+// AMD64-MINGW: "-cc1"
+// AMD64-MINGW: "-triple"
+// AMD64-MINGW: "amd64--mingw32"
+// AMD64-MINGW: "-munwind-tables"
More information about the cfe-commits
mailing list