Home | History | Annotate | Download | only in Core
      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::setArch(const std::string& pArchName)
     42 {
     43   m_ArchName = pArchName;
     44 }
     45 
     46 void TargetOptions::setTargetCPU(const std::string& pCPU)
     47 {
     48   m_TargetCPU = pCPU;
     49 }
     50 
     51 void TargetOptions::setTargetFeatureString(const std::string& pFS)
     52 {
     53   m_TargetFS = pFS;
     54 }
     55 
     56