diff options
| author | Jim Grosbach <grosbach@apple.com> | 2011-10-07 18:27:04 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2011-10-07 18:27:04 +0000 |
| commit | b8d9f51e4c2c8418e4c59fd64ed4c6052b055f76 (patch) | |
| tree | a9cf14e928ff9c01edf7aaf219e035b854e98523 /llvm/lib/Target/ARM | |
| parent | 206d8a7f480a9ce3e38f6e611303bdc3c0ee2c44 (diff) | |
| download | bcm5719-llvm-b8d9f51e4c2c8418e4c59fd64ed4c6052b055f76.tar.gz bcm5719-llvm-b8d9f51e4c2c8418e4c59fd64ed4c6052b055f76.zip | |
Improve ARM assembly parser diagnostic for unexpected tokens.
Consider:
mov r8, r11 fred
Previously, we issued the not very informative:
x.s:6:1: error: unexpected token in argument list
^
Now we generate:
x.s:5:14: error: unexpected token in argument list
mov r8, r11 fred
^
llvm-svn: 141380
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 355bb98e8bc..460855b1090 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -3617,8 +3617,9 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc, } if (getLexer().isNot(AsmToken::EndOfStatement)) { + SMLoc Loc = getLexer().getLoc(); Parser.EatToEndOfStatement(); - return TokError("unexpected token in argument list"); + return Error(Loc, "unexpected token in argument list"); } Parser.Lex(); // Consume the EndOfStatement |

