Skip to content

Commit 07def27

Browse files
authored
[M68k] Remove STI from M68kAsmParser (#159827)
STI exists in the base class, use it instead. Fixes #159862.
1 parent 386301c commit 07def27

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ static cl::opt<bool> RegisterPrefixOptional(
3232
namespace {
3333
/// Parses M68k assembly from a stream.
3434
class M68kAsmParser : public MCTargetAsmParser {
35-
const MCSubtargetInfo &STI;
3635
MCAsmParser &Parser;
3736
const MCRegisterInfo *MRI;
3837

@@ -58,7 +57,7 @@ class M68kAsmParser : public MCTargetAsmParser {
5857
public:
5958
M68kAsmParser(const MCSubtargetInfo &STI, MCAsmParser &Parser,
6059
const MCInstrInfo &MII, const MCTargetOptions &Options)
61-
: MCTargetAsmParser(Options, STI, MII), STI(STI), Parser(Parser) {
60+
: MCTargetAsmParser(Options, STI, MII), Parser(Parser) {
6261
MCAsmParserExtension::Initialize(Parser);
6362
MRI = getContext().getRegisterInfo();
6463

@@ -1024,7 +1023,7 @@ bool M68kAsmParser::missingFeature(llvm::SMLoc const &Loc,
10241023
bool M68kAsmParser::emit(MCInst &Inst, SMLoc const &Loc,
10251024
MCStreamer &Out) const {
10261025
Inst.setLoc(Loc);
1027-
Out.emitInstruction(Inst, STI);
1026+
Out.emitInstruction(Inst, *STI);
10281027

10291028
return false;
10301029
}

0 commit comments

Comments
 (0)