diff options
author | Zhen Cao <zhen.cao@autodesk.com> | 2017-11-17 16:17:56 +0000 |
---|---|---|
committer | Zhen Cao <zhen.cao@autodesk.com> | 2017-11-17 16:17:56 +0000 |
commit | e66112a7be19fc5f77edca824b67761dc52ee913 (patch) | |
tree | ba054bf4f0c1eb4bacb6292c016ec1820e715574 /lib/MC | |
parent | fa8708611de351299d0cb0f07630d72fe67a5a41 (diff) |
[MC] Fix regression tests on Windows when git “core.autocrlf” is set to true.
Differential Revision: https://reviews.llvm.org/D39737
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCParser/AsmLexer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/MC/MCParser/AsmLexer.cpp b/lib/MC/MCParser/AsmLexer.cpp index b83b6d3dcf6..74835fd70c0 100644 --- a/lib/MC/MCParser/AsmLexer.cpp +++ b/lib/MC/MCParser/AsmLexer.cpp @@ -210,6 +210,8 @@ AsmToken AsmLexer::LexLineComment() { int CurChar = getNextChar(); while (CurChar != '\n' && CurChar != '\r' && CurChar != EOF) CurChar = getNextChar(); + if (CurChar == '\r' && CurPtr != CurBuf.end() && *CurPtr == '\n') + ++CurPtr; // If we have a CommentConsumer, notify it about the comment. if (CommentConsumer) { |