aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
-rw-r--r--lib/Driver/ToolChain.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index 9dcdafc872..de8ed1d1c5 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -33,6 +33,21 @@ const Driver &ToolChain::getDriver() const {
return D;
}
+std::string ToolChain::getDefaultUniversalArchName() const {
+ // In universal driver terms, the arch name accepted by -arch isn't exactly
+ // the same as the ones that appear in the triple. Roughly speaking, this is
+ // an inverse of the darwin::getArchTypeForDarwinArchName() function, but the
+ // only interesting special case is powerpc.
+ switch (Triple.getArch()) {
+ case llvm::Triple::ppc:
+ return "ppc";
+ case llvm::Triple::ppc64:
+ return "ppc64";
+ default:
+ return Triple.getArchName();
+ }
+}
+
bool ToolChain::IsUnwindTablesDefault() const {
return false;
}