]> granicus.if.org Git - llvm/commitdiff
[mips] Make a couple of class methods plain static functions. NFC
authorSimon Atanasyan <simon@atanasyan.com>
Wed, 7 Aug 2019 12:21:41 +0000 (12:21 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Wed, 7 Aug 2019 12:21:41 +0000 (12:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368162 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
lib/Target/Mips/MipsTargetStreamer.h

index 1c6eaa15dcadb35415982887d8662cb2f679cb4b..8c2c5fff6d58204e9f1fab08251832ae5b9859b5 100644 (file)
@@ -34,6 +34,15 @@ static cl::opt<bool> 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) {}
index 91f26b2e4cd688b2b67f9f4c404975fb887b92b9..3db06d6cfa84d7f72d38945dd43d85e6bcc35e83 100644 (file)
@@ -191,9 +191,6 @@ public:
     return *ABI;
   }
 
-  bool isMipsR6(const MCSubtargetInfo *STI) const;
-  bool isMicroMips(const MCSubtargetInfo *STI) const;
-
 protected:
   llvm::Optional<MipsABIInfo> ABI;
   MipsABIFlagsSection ABIFlagsSection;