1 //===- ARMTargetMachine.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 "ARMTargetMachine.h" 10 #include "ARM.h" 11 12 #include <mcld/Support/TargetRegistry.h> 13 14 mcld::ARMBaseTargetMachine::ARMBaseTargetMachine(llvm::TargetMachine& pPM, 15 const mcld::Target &pTarget, 16 const std::string& pTriple) 17 : mcld::MCLDTargetMachine(pPM, pTarget, pTriple) { 18 } 19 20 mcld::ARMBaseTargetMachine::~ARMBaseTargetMachine() 21 { 22 } 23 24 //===----------------------------------------------------------------------===// 25 // Initialize MCLDTargetMachine 26 //===----------------------------------------------------------------------===// 27 extern "C" void MCLDInitializeARMLDTarget() { 28 // Register createTargetMachine function pointer to mcld::Target 29 mcld::RegisterTargetMachine<mcld::ARMBaseTargetMachine> X(mcld::TheARMTarget); 30 mcld::RegisterTargetMachine<mcld::ARMBaseTargetMachine> Y(mcld::TheThumbTarget); 31 } 32 33