1 //===- lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp ---------------------===//
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "X86LinkingContext.h"
11 #include "X86TargetHandler.h"
12 #include "lld/Core/LLVM.h"
13 #include "llvm/ADT/StringSwitch.h"
14 #include "llvm/Support/ErrorOr.h"
18 std::unique_ptr<ELFLinkingContext>
19 elf::X86LinkingContext::create(llvm::Triple triple) {
20 if (triple.getArch() == llvm::Triple::x86)
21 return std::unique_ptr<ELFLinkingContext>(
22 new elf::X86LinkingContext(triple));
26 elf::X86LinkingContext::X86LinkingContext(llvm::Triple triple)
27 : ELFLinkingContext(triple, std::unique_ptr<TargetHandlerBase>(
28 new X86TargetHandler(*this))) {}