[mips] Make a couple of class methods plain static functions. NFC

llvm-svn: 368162
This commit is contained in:
Simon Atanasyan 2019-08-07 12:21:41 +00:00
parent 8a7c0e7c0a
commit e5fa049efa
2 changed files with 9 additions and 12 deletions

View 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) {}

View 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;