diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-01-26 22:29:50 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-01-26 22:29:50 +0000 |
commit | a903661289da12a657bf186399fa0eab03541b8b (patch) | |
tree | 52d12ac9066d02e9b21fef26d425b804750a0490 /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | |
parent | a25e1e4ebed1722f4d4fa41febcde1513006604c (diff) | |
download | bcm5719-llvm-a903661289da12a657bf186399fa0eab03541b8b.tar.gz bcm5719-llvm-a903661289da12a657bf186399fa0eab03541b8b.zip |
ARM: improve diagnostics for .word directive
If a complex expression was passed to the .word directive and the first part of
the directive failed to parse, a secondary diagnostic would be produced that
would clutter the error diagnostics. Improve the diagnostics by consuming the
remainder of the statement.
llvm-svn: 200160
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 06f2b4ef2ef..4577fdee37e 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -8093,8 +8093,10 @@ bool ARMAsmParser::parseDirectiveWord(unsigned Size, SMLoc L) { if (getLexer().isNot(AsmToken::EndOfStatement)) { for (;;) { const MCExpr *Value; - if (getParser().parseExpression(Value)) + if (getParser().parseExpression(Value)) { + Parser.eatToEndOfStatement(); return false; + } getParser().getStreamer().EmitValue(Value, Size); |