diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-03-20 03:05:54 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-03-20 03:05:54 +0000 |
commit | f48b93cb2054e83e43ca4391b8ec70be89fa2e30 (patch) | |
tree | 66cebd47ee2682a2d1f4a9fbef598012dfb8b915 /lib/Driver/WindowsToolChain.cpp | |
parent | 83c546afef39d6b7be69f3f399804ebf037c4022 (diff) |
Remove the Tools DensMap from the toolchain.
Each toolchain has a set of tools, but they are all of known types. It can
have a linker, an assembler, a "clang" (compile, analyze, ...) a non-clang
compiler, etc.
Instead of keeping a map, just have member variable for each type of tool.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/WindowsToolChain.cpp')
-rw-r--r-- | lib/Driver/WindowsToolChain.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/Driver/WindowsToolChain.cpp b/lib/Driver/WindowsToolChain.cpp index ae782727e4..cc52c00710 100644 --- a/lib/Driver/WindowsToolChain.cpp +++ b/lib/Driver/WindowsToolChain.cpp @@ -36,19 +36,17 @@ Windows::Windows(const Driver &D, const llvm::Triple& Triple, : ToolChain(D, Triple, Args) { } -Tool *Windows::constructTool(Action::ActionClass AC) const { - switch (AC) { - case Action::AssembleJobClass: - if (getTriple().getEnvironment() == llvm::Triple::MachO) - return new tools::darwin::Assemble(*this); +Tool *Windows::buildLinker() const { + return new tools::visualstudio::Link(*this); +} + +Tool *Windows::buildAssembler() const { + if (getTriple().getEnvironment() == llvm::Triple::MachO) + return new tools::darwin::Assemble(*this); + else // There no assembler we can use on windows other than the integrated // assembler, so we ignore -no-integrated-as. - return new tools::ClangAs(*this); - case Action::LinkJobClass: - return new tools::visualstudio::Link(*this); - default: - return ToolChain::constructTool(AC); - } + return ToolChain::buildAssembler(); } bool Windows::IsIntegratedAssemblerDefault() const { |