summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/MC/MCFragment.h3
-rw-r--r--llvm/lib/MC/MCFragment.cpp2
2 files changed, 1 insertions, 4 deletions
diff --git a/llvm/include/llvm/MC/MCFragment.h b/llvm/include/llvm/MC/MCFragment.h
index edc25ec38b7..1ecbdbfa980 100644
--- a/llvm/include/llvm/MC/MCFragment.h
+++ b/llvm/include/llvm/MC/MCFragment.h
@@ -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;
};
diff --git a/llvm/lib/MC/MCFragment.cpp b/llvm/lib/MC/MCFragment.cpp
index 5192948ed39..f6b64c8fa95 100644
--- a/llvm/lib/MC/MCFragment.cpp
+++ b/llvm/lib/MC/MCFragment.cpp
@@ -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);
}
OpenPOWER on IntegriCloud