From: Simon Atanasyan Date: Wed, 7 Aug 2019 12:21:41 +0000 (+0000) Subject: [mips] Make a couple of class methods plain static functions. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50ef2839f968711c54af7e871d1bd49d668d5a46;p=llvm [mips] Make a couple of class methods plain static functions. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368162 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp index 1c6eaa15dca..8c2c5fff6d5 100644 --- a/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp +++ b/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp @@ -34,6 +34,15 @@ static cl::opt RoundSectionSizes( cl::desc("Round section sizes up to the section alignment"), cl::Hidden); } // end anonymous namespace +static bool isMipsR6(const MCSubtargetInfo *STI) { + return STI->getFeatureBits()[Mips::FeatureMips32r6] || + STI->getFeatureBits()[Mips::FeatureMips64r6]; +} + +static bool isMicroMips(const MCSubtargetInfo *STI) { + return STI->getFeatureBits()[Mips::FeatureMicroMips]; +} + MipsTargetStreamer::MipsTargetStreamer(MCStreamer &S) : MCTargetStreamer(S), GPReg(Mips::GP), ModuleDirectiveAllowed(true) { GPRInfoSet = FPRInfoSet = FrameInfoSet = false; @@ -430,15 +439,6 @@ void MipsTargetStreamer::emitLoadWithSymOffset(unsigned Opcode, unsigned DstReg, emitRRX(Opcode, DstReg, TmpReg, LoOperand, IDLoc, STI); } -bool MipsTargetStreamer::isMipsR6(const MCSubtargetInfo *STI) const { - return STI->getFeatureBits()[Mips::FeatureMips32r6] || - STI->getFeatureBits()[Mips::FeatureMips64r6]; -} - -bool MipsTargetStreamer::isMicroMips(const MCSubtargetInfo *STI) const { - return STI->getFeatureBits()[Mips::FeatureMicroMips]; -} - MipsTargetAsmStreamer::MipsTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS) : MipsTargetStreamer(S), OS(OS) {} diff --git a/lib/Target/Mips/MipsTargetStreamer.h b/lib/Target/Mips/MipsTargetStreamer.h index 91f26b2e4cd..3db06d6cfa8 100644 --- a/lib/Target/Mips/MipsTargetStreamer.h +++ b/lib/Target/Mips/MipsTargetStreamer.h @@ -191,9 +191,6 @@ public: return *ABI; } - bool isMipsR6(const MCSubtargetInfo *STI) const; - bool isMicroMips(const MCSubtargetInfo *STI) const; - protected: llvm::Optional ABI; MipsABIFlagsSection ABIFlagsSection;