Home | History | Annotate | Download | only in Core
      1 //===- LinkerConfig.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/LinkerConfig.h"
     10 
     11 #include "mcld/Config/Config.h"
     12 #include "mcld/Support/MsgHandling.h"
     13 
     14 namespace mcld {
     15 
     16 //===----------------------------------------------------------------------===//
     17 // LinkerConfig
     18 //===----------------------------------------------------------------------===//
     19 LinkerConfig::LinkerConfig()
     20     : m_Options(),
     21       m_Targets(),
     22       m_Attribute(),
     23       m_CodeGenType(Unknown),
     24       m_CodePosition(Unset) {
     25   // FIXME: is here the right place to hold this?
     26   InitializeDiagnosticEngine(*this);
     27 }
     28 
     29 LinkerConfig::LinkerConfig(const std::string& pTripleString)
     30     : m_Options(),
     31       m_Targets(pTripleString),
     32       m_Attribute(),
     33       m_CodeGenType(Unknown),
     34       m_CodePosition(Unset) {
     35   // FIXME: is here the right place to hold this?
     36   InitializeDiagnosticEngine(*this);
     37 }
     38 
     39 LinkerConfig::~LinkerConfig() {
     40   // FIXME: is here the right place to hold this?
     41   FinalizeDiagnosticEngine();
     42 }
     43 
     44 const char* LinkerConfig::version() {
     45   return MCLD_VERSION;
     46 }
     47 
     48 }  // namespace mcld
     49