diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-11 16:18:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-11 16:18:25 +0000 |
commit | a2a9d16b782f037132326535082ddd42bfb4551f (patch) | |
tree | 76b061316e7ddf592335a843356d23a9fbf01b88 /llvm/lib/MC/MCParser/AsmParser.cpp | |
parent | 6e321507b6e61bb5a2b83981aedb2428479ee009 (diff) | |
download | bcm5719-llvm-a2a9d16b782f037132326535082ddd42bfb4551f.tar.gz bcm5719-llvm-a2a9d16b782f037132326535082ddd42bfb4551f.zip |
fix the asmparser so that the target is responsible for skipping to
the end of the line on a parser error, allowing skipping to happen
for syntactic errors but not for semantic errors. Before we would
miss emitting a diagnostic about the second line, because we skipped
it due to the semantic error on the first line:
foo %eax
bar %al
This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors
llvm-svn: 113688
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 13aaeba156c..0a664fd876a 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -965,7 +965,9 @@ bool AsmParser::ParseStatement() { for (unsigned i = 0, e = ParsedOperands.size(); i != e; ++i) delete ParsedOperands[i]; - return HadError; + // Don't skip the rest of the line, the instruction parser is responsible for + // that. + return false; } MacroInstantiation::MacroInstantiation(const Macro *M, SMLoc IL, SMLoc EL, |