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