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