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