• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- Fragment.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 
10 #include <mcld/LD/Fragment.h>
11 
12 #include <llvm/Support/DataTypes.h>
13 
14 #include <mcld/LD/SectionData.h>
15 
16 using namespace mcld;
17 
18 //===----------------------------------------------------------------------===//
19 // Fragment
20 //===----------------------------------------------------------------------===//
Fragment()21 Fragment::Fragment()
22   : m_Kind(Type(~0)), m_pParent(NULL), m_Offset(~uint64_t(0)), m_LayoutOrder(~(0U)) {
23 }
24 
Fragment(Type pKind,SectionData * pParent)25 Fragment::Fragment(Type pKind, SectionData *pParent)
26   : m_Kind(pKind), m_pParent(pParent), m_Offset(~uint64_t(0)), m_LayoutOrder(~(0U)) {
27   if (NULL != m_pParent)
28     m_pParent->getFragmentList().push_back(this);
29 }
30 
~Fragment()31 Fragment::~Fragment()
32 {
33 }
34 
35