Skip to content

Commit 11f4be0

Browse files
authored
MSP430: Do not add target specific STI member to MSP430AsmParser (#156443)
The base class already has an STI pointer member, so use that.
1 parent 1321739 commit 11f4be0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ namespace {
3636

3737
/// Parses MSP430 assembly from a stream.
3838
class MSP430AsmParser : public MCTargetAsmParser {
39-
const MCSubtargetInfo &STI;
4039
MCAsmParser &Parser;
4140
const MCRegisterInfo *MRI;
4241

@@ -79,7 +78,7 @@ class MSP430AsmParser : public MCTargetAsmParser {
7978
public:
8079
MSP430AsmParser(const MCSubtargetInfo &STI, MCAsmParser &Parser,
8180
const MCInstrInfo &MII, const MCTargetOptions &Options)
82-
: MCTargetAsmParser(Options, STI, MII), STI(STI), Parser(Parser) {
81+
: MCTargetAsmParser(Options, STI, MII), Parser(Parser) {
8382
MCAsmParserExtension::Initialize(Parser);
8483
MRI = getContext().getRegisterInfo();
8584

@@ -264,7 +263,7 @@ bool MSP430AsmParser::matchAndEmitInstruction(SMLoc Loc, unsigned &Opcode,
264263
switch (MatchResult) {
265264
case Match_Success:
266265
Inst.setLoc(Loc);
267-
Out.emitInstruction(Inst, STI);
266+
Out.emitInstruction(Inst, *STI);
268267
return false;
269268
case Match_MnemonicFail:
270269
return Error(Loc, "invalid instruction mnemonic");

0 commit comments

Comments
 (0)