TargetFragment.h revision 533eae20118036f425f27bf0536ef0ccbb090b65
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{
24protected:
25  TargetFragment(Fragment::Type pKind, SectionData* pSD = NULL)
26    : Fragment(pKind, pSD) {}
27
28public:
29  virtual ~TargetFragment() {}
30
31  static bool classof(const Fragment *F)
32  { return F->getKind() == Fragment::Target; }
33
34  static bool classof(const TargetFragment *)
35  { return true; }
36};
37
38} // namespace of mcld
39
40#endif
41
42