TargetLDBackend.cpp revision affc150dc44fab1911775a49636d0ce85333b634
1//===- TargetLDBackend.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/LD/Relocation.h" 10#include "mcld/LD/Layout.h" 11#include "mcld/Target/TargetLDBackend.h" 12 13using namespace mcld; 14 15/* ** */ 16TargetLDBackend::TargetLDBackend() 17 : m_pEhFrame(NULL) { 18} 19 20TargetLDBackend::~TargetLDBackend() 21{ 22 if (NULL != m_pEhFrame) 23 delete m_pEhFrame; 24} 25 26EhFrame* TargetLDBackend::getEhFrame() 27{ 28 if (NULL == m_pEhFrame) 29 m_pEhFrame = new EhFrame(); 30 return m_pEhFrame; 31} 32 33const EhFrame* TargetLDBackend::getEhFrame() const 34{ 35 assert(NULL == m_pEhFrame); 36 return m_pEhFrame; 37} 38