aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-02 05:43:56 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-02 05:43:56 +0000
commit4180011fb8cef06adec04d30486b1bf3b99aa8b8 (patch)
tree1d8d04550c254820bac18ca8a49990d6e48966fa /lib/Driver/ToolChains.cpp
parent74edcea3db1f85ba73ad0fede2ed5e2f096cac4b (diff)
Driver: Move HostInfo::lookupTypeForExtension to ToolChain::LookupTypeForExtension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r--lib/Driver/ToolChains.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 0449711208..bdccc3e3da 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -40,6 +40,16 @@ Darwin::Darwin(const HostInfo &Host, const llvm::Triple& Triple,
<< _DarwinVersion[1];
}
+types::ID Darwin::LookupTypeForExtension(const char *Ext) const {
+ types::ID Ty = types::lookupTypeForExtension(Ext);
+
+ // Darwin always preprocesses assembly files (unless -x is used explicitly).
+ if (Ty == types::TY_PP_Asm)
+ return types::TY_Asm;
+
+ return Ty;
+}
+
// FIXME: Can we tablegen this?
static const char *GetArmArchForMArch(llvm::StringRef Value) {
if (Value == "armv6k")