• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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()16  TargetOptions::TargetOptions()
17      : m_Endian(Unknown),
18        m_BitClass(0),
19        m_GPSize(8),
20        m_StubGroupSize(0),
21        m_FixCA53Erratum835769(false) {
22  }
23  
TargetOptions(const std::string & pTriple)24  TargetOptions::TargetOptions(const std::string& pTriple)
25      : m_Triple(pTriple),
26        m_Endian(Unknown),
27        m_BitClass(0),
28        m_GPSize(8),
29        m_StubGroupSize(0),
30        m_FixCA53Erratum835769(false) {
31  }
32  
~TargetOptions()33  TargetOptions::~TargetOptions() {
34  }
35  
setTriple(const llvm::Triple & pTriple)36  void TargetOptions::setTriple(const llvm::Triple& pTriple) {
37    m_Triple = pTriple;
38  }
39  
setTriple(const std::string & pTriple)40  void TargetOptions::setTriple(const std::string& pTriple) {
41    m_Triple.setTriple(pTriple);
42  }
43  
setArch(const std::string & pArchName)44  void TargetOptions::setArch(const std::string& pArchName) {
45    m_ArchName = pArchName;
46  }
47  
setTargetCPU(const std::string & pCPU)48  void TargetOptions::setTargetCPU(const std::string& pCPU) {
49    m_TargetCPU = pCPU;
50  }
51  
52  }  // namespace mcld
53