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