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/Target/TargetMachine.h> 13 #include <mcld/Support/TargetRegistry.h> 14 MCLDInitializeX86LDTarget()15extern "C" void MCLDInitializeX86LDTarget() { 16 // Register createTargetMachine function pointer to mcld::Target 17 mcld::RegisterTargetMachine<mcld::X86TargetMachine> X(mcld::TheX86_32Target); 18 mcld::RegisterTargetMachine<mcld::X86TargetMachine> Y(mcld::TheX86_64Target); 19 } 20 X86TargetMachine(llvm::TargetMachine & pPM,const mcld::Target & pTarget,const std::string & pTriple)21mcld::X86TargetMachine::X86TargetMachine(llvm::TargetMachine& pPM, 22 const mcld::Target &pTarget, 23 const std::string& pTriple) 24 : mcld::MCLDTargetMachine(pPM, pTarget, pTriple) { 25 } 26 ~X86TargetMachine()27mcld::X86TargetMachine::~X86TargetMachine() 28 { 29 } 30 31