summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-11 16:18:25 +0000
committerChris Lattner <sabre@nondot.org>2010-09-11 16:18:25 +0000
commita2a9d16b782f037132326535082ddd42bfb4551f (patch)
tree76b061316e7ddf592335a843356d23a9fbf01b88 /llvm/lib/MC/MCParser/AsmParser.cpp
parent6e321507b6e61bb5a2b83981aedb2428479ee009 (diff)
downloadbcm5719-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.cpp4
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,
OpenPOWER on IntegriCloud