C++程序  |  55行  |  1.37 KB

//===- LinkerConfig.cpp ---------------------------------------------------===//
//
//                     The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <mcld/LinkerConfig.h>
#include <mcld/Config/Config.h>

#include <mcld/Support/MsgHandling.h>

using namespace mcld;

//===----------------------------------------------------------------------===//
// LinkerConfig
//===----------------------------------------------------------------------===//
LinkerConfig::LinkerConfig()
  : m_Options(),
    m_Scripts(),
    m_Targets(),
    m_Bitcode(),
    m_Attribute(),
    m_CodeGenType(Unknown),
    m_CodePosition(DynamicDependent)
{
  // FIXME: is here the right place to hold this?
  InitializeDiagnosticEngine(*this);
}

LinkerConfig::LinkerConfig(const std::string& pTripleString)
  : m_Options(),
    m_Scripts(),
    m_Targets(pTripleString),
    m_Bitcode(),
    m_Attribute(),
    m_CodeGenType(Unknown),
    m_CodePosition(DynamicDependent)
{
  // FIXME: is here the right place to hold this?
  InitializeDiagnosticEngine(*this);
}

LinkerConfig::~LinkerConfig()
{
  // FIXME: is here the right place to hold this?
  FinalizeDiagnosticEngine();
}

const char* LinkerConfig::version()
{
  return MCLD_VERSION;
}