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 using namespace mcld; 12 13 //===----------------------------------------------------------------------===// 14 // TargetOptions 15 //===----------------------------------------------------------------------===// TargetOptions()16TargetOptions::TargetOptions() 17 : m_Endian(Unknown), 18 m_BitClass(0) { 19 } 20 TargetOptions(const std::string & pTriple)21TargetOptions::TargetOptions(const std::string& pTriple) 22 : m_Triple(pTriple), 23 m_Endian(Unknown), 24 m_BitClass(0) { 25 } 26 ~TargetOptions()27TargetOptions::~TargetOptions() 28 { 29 } 30 setTriple(const llvm::Triple & pTriple)31void TargetOptions::setTriple(const llvm::Triple& pTriple) 32 { 33 m_Triple = pTriple; 34 } 35 setTriple(const std::string & pTriple)36void TargetOptions::setTriple(const std::string& pTriple) 37 { 38 m_Triple.setTriple(pTriple); 39 } 40 setArch(const std::string & pArchName)41void TargetOptions::setArch(const std::string& pArchName) 42 { 43 m_ArchName = pArchName; 44 } 45 setTargetCPU(const std::string & pCPU)46void TargetOptions::setTargetCPU(const std::string& pCPU) 47 { 48 m_TargetCPU = pCPU; 49 } 50 setTargetFeatureString(const std::string & pFS)51void TargetOptions::setTargetFeatureString(const std::string& pFS) 52 { 53 m_TargetFS = pFS; 54 } 55 56