From 6a3cbc35a75468d565385a0db8e7051478f383f4 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Wed, 16 Jan 2013 16:52:08 +0000 Subject: [PATCH] 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 --- include/llvm/MC/MCAssembler.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 8269f08c449..981002f7981 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -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::const_iterator const_fixup_iterator; typedef SmallVectorImpl::iterator fixup_iterator; @@ -198,7 +190,8 @@ public: virtual const_fixup_iterator fixup_end() const = 0; static bool classof(const MCFragment *F) { - return isa(F) && F->hasFixups(); + MCFragment::FragmentType Kind = F->getKind(); + return Kind == MCFragment::FT_Relaxable || Kind == MCFragment::FT_Data; } };