aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-10-16 22:20:03 +0000
committerReid Kleckner <rnk@google.com>2017-10-16 22:20:03 +0000
commit983f9af008ef293025c0e0198f0726ee64ffc793 (patch)
treead5fe4cf17566f213b2a67d8b0631cb790b95372 /test
parent7b58f472aaaca5e1195d0c6a47e6a2657fb74ff2 (diff)
downloadllvm-983f9af008ef293025c0e0198f0726ee64ffc793.tar.gz
[MC] Lex CRLF as one token
This will prevent doubling of line endings when parsing assembly and emitting assembly. Otherwise we'd parse the directive, consume the end of statement, hit the next end of statement, and emit a fresh newline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/X86/crlf.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/MC/X86/crlf.test b/test/MC/X86/crlf.test
new file mode 100644
index 00000000000..66014456138
--- /dev/null
+++ b/test/MC/X86/crlf.test
@@ -0,0 +1,5 @@
+RUN: printf '\r\n\r\n' | llvm-mc -as-lex | FileCheck %s
+There should only be two end of statements.
+CHECK: EndOfStatement
+CHECK: EndOfStatement
+CHECK-NOT: EndOfStatement