From 395a7e5d35154c8d8e573fa1e3898dc3f8ce7ef9 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 llvm-svn: 172622 --- llvm/include/llvm/MC/MCAssembler.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/llvm/include/llvm/MC/MCAssembler.h b/llvm/include/llvm/MC/MCAssembler.h index 8269f08..981002f 100644 --- a/llvm/include/llvm/MC/MCAssembler.h +++ b/llvm/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; } }; -- 2.7.4