<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Thank you for your comment, Zachary.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> Zachary Turner [mailto:zturner@google.com] <br>
<b>Sent:</b> Tuesday, November 7, 2017 11:58 AM<br>
<b>To:</b> reviews+D39737+public+a17c03644213de66@reviews.llvm.org<br>
<b>Cc:</b> Zhen Cao <zhen.cao@autodesk.com>; rnk@google.com; grosbach@apple.com; bigcheesegs@gmail.com; javed.absar@arm.com<br>
<b>Subject:</b> Re: [PATCH] D39737: [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m not very crazy about this, as I generally think core.autocrlf=false should be mandatory. But if other people think this is ok, I guess I’m fine
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Nov 7, 2017 at 8:45 AM Zhen Cao via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">caoz created this revision.<br>
Herald added a subscriber: javed.absar.<br>
<br>
Fix regression tests on Windows when git “core.autocrlf” is set to true.<br>
<br>
See: <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.llvm.org_show-5Fbug.cgi-3Fid-3D35095&d=DwMFaQ&c=76Q6Tcqc-t2x0ciWn7KFdCiqt6IQ7a_IF9uzNzd_2pA&r=5bO7zfHLitDTGEV53jsIoKY9YZM-dEXQXjvwmt4K1Xs&m=VVNS0g2YHbK-w6I6rcS2Q4eHXb1kA0qGhu4gh9wWHW0&s=KKngOrrDte4O1dFqzI4sDndJ-uhKD2CwusDUSKfs55I&e=" target="_blank">
https://bugs.llvm.org/show_bug.cgi?id=35095</a><br>
<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D39737&d=DwMFaQ&c=76Q6Tcqc-t2x0ciWn7KFdCiqt6IQ7a_IF9uzNzd_2pA&r=5bO7zfHLitDTGEV53jsIoKY9YZM-dEXQXjvwmt4K1Xs&m=VVNS0g2YHbK-w6I6rcS2Q4eHXb1kA0qGhu4gh9wWHW0&s=zI_VRwP7vH9gWXzF5ZRdemhP7mzQMnuGarBpJVXWvT8&e=" target="_blank">https://reviews.llvm.org/D39737</a><br>
<br>
Files:<br>
  .gitattributes<br>
  lib/MC/MCParser/AsmLexer.cpp<br>
<br>
<br>
Index: lib/MC/MCParser/AsmLexer.cpp<br>
===================================================================<br>
--- lib/MC/MCParser/AsmLexer.cpp<br>
+++ lib/MC/MCParser/AsmLexer.cpp<br>
@@ -210,6 +210,8 @@<br>
   int CurChar = getNextChar();<br>
   while (CurChar != '\n' && CurChar != '\r' && CurChar != EOF)<br>
     CurChar = getNextChar();<br>
+  if (CurChar == '\r')<br>
+      CurPtr++;<br>
<br>
   // If we have a CommentConsumer, notify it about the comment.<br>
   if (CommentConsumer) {<br>
@@ -610,6 +612,8 @@<br>
   case '\r':<br>
     IsAtStartOfLine = true;<br>
     IsAtStartOfStatement = true;<br>
+    if (CurChar == '\r')<br>
+        CurPtr++;<br>
     return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 1));<br>
   case ':': return AsmToken(AsmToken::Colon, StringRef(TokStart, 1));<br>
   case '+': return AsmToken(AsmToken::Plus, StringRef(TokStart, 1));<br>
Index: .gitattributes<br>
===================================================================<br>
--- /dev/null<br>
+++ .gitattributes<br>
@@ -0,0 +1,8 @@<br>
+test/Object/Inputs/*.a-* binary<br>
+test/tools/dsymutil/Inputs/* binary<br>
+test/tools/llvm-ar/Inputs/*.lib binary<br>
+test/tools/llvm-objdump/Inputs/*.a binary<br>
+test/tools/llvm-rc/Inputs/* binary<br>
+test/tools/llvm-strings/Inputs/numbers binary<br>
+test/MC/AsmParser/incbin_abcd binary<br>
+test/YAMLParser/spec-09-02.test binary<br>
<br>
<o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>