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