aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
commitcbf8a98c7c652e96967623c80cb945fef001b090 (patch)
tree4bdc89830d85da133ae48d2a0ad25bd24828ca1d /include
parent12649372124260d05afa7f73802202c522f5d376 (diff)
downloadexternal_llvm-cbf8a98c7c652e96967623c80cb945fef001b090.zip
external_llvm-cbf8a98c7c652e96967623c80cb945fef001b090.tar.gz
external_llvm-cbf8a98c7c652e96967623c80cb945fef001b090.tar.bz2
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCParser/MCAsmParser.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/MC/MCParser/MCAsmParser.h b/include/llvm/MC/MCParser/MCAsmParser.h
index b37d46c..6e1e2e3 100644
--- a/include/llvm/MC/MCParser/MCAsmParser.h
+++ b/include/llvm/MC/MCParser/MCAsmParser.h
@@ -99,6 +99,10 @@ public:
/// will be either the EndOfStatement or EOF.
virtual StringRef ParseStringToEndOfStatement() = 0;
+ /// EatToEndOfStatement - Skip to the end of the current statement, for error
+ /// recovery.
+ virtual void EatToEndOfStatement() = 0;
+
/// ParseExpression - Parse an arbitrary expression.
///
/// @param Res - The value of the expression. The result is undefined