summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorZhen Cao <zhen.cao@autodesk.com>2017-11-17 16:17:56 +0000
committerZhen Cao <zhen.cao@autodesk.com>2017-11-17 16:17:56 +0000
commitac358137f7395b4217eb65a1a860ed2eecf1d70e (patch)
treee9372713277ff3eaddaf172af7f4e6c0ddb2aa80 /llvm/lib
parent0924094e347ed2bf3c6824f27931ec3571089e7b (diff)
downloadbcm5719-llvm-ac358137f7395b4217eb65a1a860ed2eecf1d70e.tar.gz
bcm5719-llvm-ac358137f7395b4217eb65a1a860ed2eecf1d70e.zip
[MC] Fix regression tests on Windows when git “core.autocrlf” is set to true.
Differential Revision: https://reviews.llvm.org/D39737 llvm-svn: 318528
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/MCParser/AsmLexer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCParser/AsmLexer.cpp b/llvm/lib/MC/MCParser/AsmLexer.cpp
index b83b6d3dcf6..74835fd70c0 100644
--- a/llvm/lib/MC/MCParser/AsmLexer.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud