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