Skip to content

Commit e741242

Browse files
committed
[M68k] Remove STI from M68kAsmParser
This already exists in the base class. This resolves a build error: ``` lib/Target/M68k/M68kGenAsmMatcher.inc:2633:60: error: indirection requires pointer operand ('const MCSubtargetInfo' invalid) 2633 | unsigned Diag = validateOperandClass(Actual, Formal, *STI); | ^~~~ 1 error generated. ```
1 parent 4cace1f commit e741242

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)