Replace virtual hasFixups with explicit fragment type checks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172622 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Bendersky 2013-01-16 16:52:08 +00:00
parent 655578f8b5
commit 6a3cbc35a7

View File

@ -122,10 +122,6 @@ public:
virtual void setBundlePadding(uint8_t N) {
}
virtual bool hasFixups() const {
return false;
}
void dump();
};
@ -182,10 +178,6 @@ public:
virtual ~MCEncodedFragmentWithFixups();
virtual bool hasFixups() const {
return true;
}
typedef SmallVectorImpl<MCFixup>::const_iterator const_fixup_iterator;
typedef SmallVectorImpl<MCFixup>::iterator fixup_iterator;
@ -198,7 +190,8 @@ public:
virtual const_fixup_iterator fixup_end() const = 0;
static bool classof(const MCFragment *F) {
return isa<MCEncodedFragment>(F) && F->hasFixups();
MCFragment::FragmentType Kind = F->getKind();
return Kind == MCFragment::FT_Relaxable || Kind == MCFragment::FT_Data;
}
};