[PATCH] D83347: [ms] [llvm-ml] Add support for line continuations in MASM
Eric Astor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 14:51:17 PDT 2020
epastor updated this revision to Diff 276222.
epastor added a comment.
Rebase on parent
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83347/new/
https://reviews.llvm.org/D83347
Files:
llvm/lib/MC/MCParser/MasmParser.cpp
Index: llvm/lib/MC/MCParser/MasmParser.cpp
===================================================================
--- llvm/lib/MC/MCParser/MasmParser.cpp
+++ llvm/lib/MC/MCParser/MasmParser.cpp
@@ -1099,6 +1099,14 @@
tok = &Lexer.Lex();
}
+ // Recognize and bypass line continuations.
+ while (tok->is(AsmToken::BackSlash) &&
+ Lexer.peekTok().is(AsmToken::EndOfStatement)) {
+ // Eat both the backslash and the end of statement.
+ Lexer.Lex();
+ tok = &Lexer.Lex();
+ }
+
if (tok->is(AsmToken::Eof)) {
// If this is the end of an included file, pop the parent file off the
// include stack.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83347.276222.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200707/97a7d234/attachment.bin>
More information about the llvm-commits
mailing list