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