allow \r's in .s files.
authorChris Lattner <sabre@nondot.org>
Thu, 4 Aug 2011 19:31:26 +0000 (19:31 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 4 Aug 2011 19:31:26 +0000 (19:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136908 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCParser/AsmLexer.cpp

index 0c1f8f0df7746f5ca3ecc90f894ea4bafa1a548e..bbb0bbc8b243767a795a30479bd5054e5dc15e1d 100644 (file)
@@ -146,7 +146,7 @@ AsmToken AsmLexer::LexLineComment() {
   // FIXME: This is broken if we happen to a comment at the end of a file, which
   // was .included, and which doesn't end with a newline.
   int CurChar = getNextChar();
-  while (CurChar != '\n' && CurChar != '\n' && CurChar != EOF)
+  while (CurChar != '\n' && CurChar != '\r' && CurChar != EOF)
     CurChar = getNextChar();
 
   if (CurChar == EOF)