1//===- MCLDInput.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/MC/MCLDInput.h" 10#include "mcld/MC/MCLDAttribute.h" 11 12using namespace mcld; 13 14//========================== 15// MCInput 16Input::Input(llvm::StringRef pName, const AttributeProxy& pProxy) 17 : MCLDFile(pName), 18 m_pAttr(const_cast<Attribute*>(pProxy.attr())), 19 m_bNeeded(false) { 20} 21 22Input::Input(llvm::StringRef pName, 23 const sys::fs::Path& pPath, 24 const AttributeProxy& pProxy, 25 unsigned int pType, 26 off_t pFileOffset) 27 : MCLDFile(pName, pPath, pType), 28 m_pAttr(const_cast<Attribute*>(pProxy.attr())), 29 m_bNeeded(false), 30 m_fileOffset(pFileOffset) { 31} 32 33Input::~Input() 34{ 35 // do nothing. Attribute is deleted by AttributeFactory 36} 37 38