1//===- TargetFragment.h ---------------------------------------------------===//
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#ifndef MCLD_FRAGMENT_TARGETFRAGMENT_H_
10#define MCLD_FRAGMENT_TARGETFRAGMENT_H_
11
12#include "mcld/Fragment/Fragment.h"
13
14namespace mcld {
15
16class SectionData;
17
18/** \class TargetFragment
19 *  \brief TargetFragment is a kind of MCFragment inherited by
20 *  target-depedent Fragment.
21 */
22class TargetFragment : public Fragment {
23 protected:
24  explicit TargetFragment(Fragment::Type pKind, SectionData* pSD = NULL)
25      : Fragment(pKind, pSD) {}
26
27 public:
28  virtual ~TargetFragment() {}
29
30  static bool classof(const Fragment* F) {
31    return F->getKind() == Fragment::Target;
32  }
33
34  static bool classof(const TargetFragment*) { return true; }
35};
36
37}  // namespace mcld
38
39#endif  // MCLD_FRAGMENT_TARGETFRAGMENT_H_
40