blob: 81a8b602b16bef46f28b0764718a8232e8b149c8 [file] [log] [blame]
//===- MCLDInput.cpp ------------------------------------------------------===//
//
// The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "mcld/MC/MCLDInput.h"
#include "mcld/MC/MCLDAttribute.h"
using namespace mcld;
//==========================
// MCInput
Input::Input(llvm::StringRef pName, const AttributeProxy& pProxy)
: MCLDFile(pName),
m_pAttr(const_cast<Attribute*>(pProxy.attr())),
m_bNeeded(false) {
}
Input::Input(llvm::StringRef pName,
const sys::fs::Path& pPath,
const AttributeProxy& pProxy,
unsigned int pType,
off_t pFileOffset)
: MCLDFile(pName, pPath, pType),
m_pAttr(const_cast<Attribute*>(pProxy.attr())),
m_bNeeded(false),
m_fileOffset(pFileOffset) {
}
Input::~Input()
{
// do nothing. Attribute is deleted by AttributeFactory
}