[MC] Delete MCFragment::isDummy. NFC

isa<...>, dyn_cast<...> and cast<...> are used by other fragments.
Don't make MCDummyFragment special.
This commit is contained in:
Fangrui Song 2020-01-05 18:44:22 -08:00
parent 95840866b7
commit 2c053109fa
2 changed files with 1 additions and 4 deletions

View File

@ -106,9 +106,6 @@ public:
/// this is false, but specific fragment types may set it to true.
bool hasInstructions() const { return HasInstructions; }
/// Return true if given frgment has FT_Dummy type.
bool isDummy() const { return Kind == FT_Dummy; }
void dump() const;
};

View File

@ -236,7 +236,7 @@ MCFragment::MCFragment(FragmentType Kind, bool HasInstructions,
MCSection *Parent)
: Kind(Kind), HasInstructions(HasInstructions), LayoutOrder(0),
Parent(Parent), Atom(nullptr), Offset(~UINT64_C(0)) {
if (Parent && !isDummy())
if (Parent && !isa<MCDummyFragment>(*this))
Parent->getFragmentList().push_back(this);
}