diff options
| author | Greg Fitzgerald <garious@gmail.com> | 2015-01-23 19:24:32 +0000 |
|---|---|---|
| committer | Greg Fitzgerald <garious@gmail.com> | 2015-01-23 19:24:32 +0000 |
| commit | ba2bcb0da31dd9a329a9da425a1bdc1851839050 (patch) | |
| tree | f75f5f8233d661dcc47403148777024b3a94b757 /lld/lib/Driver/GnuLdDriver.cpp | |
| parent | 30609b8a78c150e6e70e39e083f5274eb82a77ef (diff) | |
| download | bcm5719-llvm-ba2bcb0da31dd9a329a9da425a1bdc1851839050.tar.gz bcm5719-llvm-ba2bcb0da31dd9a329a9da425a1bdc1851839050.zip | |
Revert " Fix the ELF shared library build targets"
This reverts commit 6a3f545b44cea46321e025d9ab773786af86cb51.
llvm-svn: 226928
Diffstat (limited to 'lld/lib/Driver/GnuLdDriver.cpp')
| -rw-r--r-- | lld/lib/Driver/GnuLdDriver.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/lld/lib/Driver/GnuLdDriver.cpp b/lld/lib/Driver/GnuLdDriver.cpp index fb58550fc1d..612a5f256a2 100644 --- a/lld/lib/Driver/GnuLdDriver.cpp +++ b/lld/lib/Driver/GnuLdDriver.cpp @@ -15,7 +15,6 @@ #include "lld/Driver/Driver.h" #include "lld/ReaderWriter/ELFLinkingContext.h" -#include "lld/ReaderWriter/ELFTargets.h" #include "lld/ReaderWriter/LinkerScript.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Optional.h" @@ -315,35 +314,6 @@ void GnuLdDriver::addPlatformSearchDirs(ELFLinkingContext &ctx, ctx.addSearchPath("=/usr/lib"); } -std::unique_ptr<ELFLinkingContext> -createELFLinkingContext(llvm::Triple triple) { - switch (triple.getArch()) { - case llvm::Triple::x86: - return std::unique_ptr<ELFLinkingContext>( - new lld::elf::X86LinkingContext(triple)); - case llvm::Triple::x86_64: - return std::unique_ptr<ELFLinkingContext>( - new lld::elf::X86_64LinkingContext(triple)); - case llvm::Triple::hexagon: - return std::unique_ptr<ELFLinkingContext>( - new lld::elf::HexagonLinkingContext(triple)); - case llvm::Triple::mipsel: - return std::unique_ptr<ELFLinkingContext>( - new lld::elf::MipsLinkingContext(triple)); - case llvm::Triple::ppc: - return std::unique_ptr<ELFLinkingContext>( - new lld::elf::PPCLinkingContext(triple)); - case llvm::Triple::aarch64: - return std::unique_ptr<ELFLinkingContext>( - new lld::elf::AArch64LinkingContext(triple)); - case llvm::Triple::arm: - return std::unique_ptr<ELFLinkingContext>( - new lld::elf::ARMLinkingContext(triple)); - default: - return nullptr; - } -} - bool GnuLdDriver::parse(int argc, const char *argv[], std::unique_ptr<ELFLinkingContext> &context, raw_ostream &diagnostics) { @@ -379,7 +349,7 @@ bool GnuLdDriver::parse(int argc, const char *argv[], if (!applyEmulation(triple, *parsedArgs, diagnostics)) return false; - std::unique_ptr<ELFLinkingContext> ctx(createELFLinkingContext(triple)); + std::unique_ptr<ELFLinkingContext> ctx(ELFLinkingContext::create(triple)); if (!ctx) { diagnostics << "unknown target triple\n"; |

