1 //===- X86TargetMachine.cpp -----------------------------------------------===// 2 // 3 // The MCLinker Project 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 #include "X86TargetMachine.h" 10 11 #include "X86.h" 12 #include <mcld/Support/TargetRegistry.h> 13 14 extern "C" void MCLDInitializeX86LDTarget() { 15 // Register createTargetMachine function pointer to mcld::Target 16 mcld::RegisterTargetMachine<mcld::X86TargetMachine> X(mcld::TheX86_32Target); 17 mcld::RegisterTargetMachine<mcld::X86TargetMachine> Y(mcld::TheX86_64Target); 18 } 19 20 using namespace mcld; 21 22 //===----------------------------------------------------------------------===// 23 // X86TargetMachine 24 //===----------------------------------------------------------------------===// 25 X86TargetMachine::X86TargetMachine(llvm::TargetMachine& pPM, 26 const llvm::Target& pLLVMTarget, 27 const mcld::Target& pMCLDTarget, 28 const std::string& pTriple) 29 : MCLDTargetMachine(pPM, pLLVMTarget, pMCLDTarget, pTriple) { 30 } 31 32