1 //===- TargetOptions.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 "mcld/TargetOptions.h" 10 11 namespace mcld { 12 13 //===----------------------------------------------------------------------===// 14 // TargetOptions 15 //===----------------------------------------------------------------------===// TargetOptions()16TargetOptions::TargetOptions() : m_Endian(Unknown), m_BitClass(0) { 17 } 18 TargetOptions(const std::string & pTriple)19TargetOptions::TargetOptions(const std::string& pTriple) 20 : m_Triple(pTriple), m_Endian(Unknown), m_BitClass(0) { 21 } 22 ~TargetOptions()23TargetOptions::~TargetOptions() { 24 } 25 setTriple(const llvm::Triple & pTriple)26void TargetOptions::setTriple(const llvm::Triple& pTriple) { 27 m_Triple = pTriple; 28 } 29 setTriple(const std::string & pTriple)30void TargetOptions::setTriple(const std::string& pTriple) { 31 m_Triple.setTriple(pTriple); 32 } 33 setArch(const std::string & pArchName)34void TargetOptions::setArch(const std::string& pArchName) { 35 m_ArchName = pArchName; 36 } 37 setTargetCPU(const std::string & pCPU)38void TargetOptions::setTargetCPU(const std::string& pCPU) { 39 m_TargetCPU = pCPU; 40 } 41 42 } // namespace mcld 43