• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- FillFragment.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/Fragment/FillFragment.h"
10 #include "mcld/LD/SectionData.h"
11 #include <cassert>
12 
13 namespace mcld {
14 
15 //===----------------------------------------------------------------------===//
16 // FillFragment
17 //===----------------------------------------------------------------------===//
FillFragment(int64_t pValue,unsigned int pValueSize,uint64_t pSize,SectionData * pSD)18 FillFragment::FillFragment(int64_t pValue,
19                            unsigned int pValueSize,
20                            uint64_t pSize,
21                            SectionData* pSD)
22     : Fragment(Fragment::Fillment, pSD),
23       m_Value(pValue),
24       m_ValueSize(pValueSize),
25       m_Size(pSize) {
26   assert((!m_ValueSize || (m_Size % m_ValueSize) == 0) &&
27          "Fill size must be a multiple of the value size!");
28 }
29 
30 }  // namespace mcld
31