Skip to content

Commit c2f9099

Browse files
committed
Use getEndloc()
1 parent 6a52127 commit c2f9099

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,17 +2156,17 @@ ParseStatus RISCVAsmParser::parsePseudoQCJumpSymbol(OperandVector &Operands) {
21562156
return ParseStatus::NoMatch;
21572157

21582158
std::string Identifier(getTok().getIdentifier());
2159-
SMLoc E = SMLoc::getFromPointer(S.getPointer() + Identifier.size());
2159+
SMLoc E = getTok().getEndLoc();
21602160

21612161
if (getLexer().peekTok().is(AsmToken::At)) {
21622162
Lex();
21632163
Lex();
21642164
SMLoc PLTLoc = getLoc();
21652165
StringRef PLT;
2166+
E = getTok().getEndLoc();
21662167
if (getParser().parseIdentifier(PLT) || PLT != "plt")
21672168
return Error(PLTLoc,
21682169
"'@plt' is the only valid operand for this instruction");
2169-
E = SMLoc::getFromPointer(S.getPointer() + /*@plt*/ 4);
21702170
} else {
21712171
Lex();
21722172
}

0 commit comments

Comments
 (0)