mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 10:27:02 +00:00
MS inline asm: Fix null SMLoc when 'ptr' is missing after dword & co
This improves the diagnostics from the regular assembler, but more importantly it fixes an assertion when parsing inline assembly. Test landing in Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
17c8fefc9f
commit
21e23ab6f9
@ -1550,7 +1550,7 @@ std::unique_ptr<X86Operand> X86AsmParser::ParseIntelOperand() {
|
|||||||
if (Size) {
|
if (Size) {
|
||||||
Parser.Lex(); // Eat operand size (e.g., byte, word).
|
Parser.Lex(); // Eat operand size (e.g., byte, word).
|
||||||
if (Tok.getString() != "PTR" && Tok.getString() != "ptr")
|
if (Tok.getString() != "PTR" && Tok.getString() != "ptr")
|
||||||
return ErrorOperand(Start, "Expected 'PTR' or 'ptr' token!");
|
return ErrorOperand(Tok.getLoc(), "Expected 'PTR' or 'ptr' token!");
|
||||||
Parser.Lex(); // Eat ptr.
|
Parser.Lex(); // Eat ptr.
|
||||||
}
|
}
|
||||||
Start = Tok.getLoc();
|
Start = Tok.getLoc();
|
||||||
|
Loading…
Reference in New Issue
Block a user