<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 25, 2015 at 11:27 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Sep 25, 2015 at 9:38 AM, Rui Ueyama via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ruiu<br>
Date: Fri Sep 25 11:38:13 2015<br>
New Revision: 248580<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=248580&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=248580&view=rev</a><br>
Log:<br>
COFF: Fix local varaible type.<br>
<br>
This is intended to be 64-bit integer, but size_t is not guranteed<br>
to be the same or larger type than uint64_t.<br>
<br>
Modified:<br>
    lld/trunk/COFF/ICF.cpp<br>
<br>
Modified: lld/trunk/COFF/ICF.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/ICF.cpp?rev=248580&r1=248579&r2=248580&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/ICF.cpp?rev=248580&r1=248579&r2=248580&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/COFF/ICF.cpp (original)<br>
+++ lld/trunk/COFF/ICF.cpp Fri Sep 25 11:38:13 2015<br>
@@ -156,7 +156,7 @@ bool ICF::partition(ChunkIterator Begin,<br>
     });<br>
     if (Bound == End)<br>
       return R;<br>
-    size_t ID = NextID++;<br>
+    uint64_t ID = NextID++;</blockquote><div><br></div></span><div>Not sure if it's better: but you could just use auto to make sure it's the same type as NextID?</div></div></div></div></blockquote><div><br></div><div>I didn't think about that, and I'm not sure if that's better too. As you can imagine, there are pros and cons. But at least this is consistent with other code in LLD which does not use auto unless it can be inferred very easily (from RHS of expression or something like that), so I'll let it alone.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">     std::for_each(It, Bound, [&](SectionChunk *SC) { SC->GroupID = ID; });<br>
     It = Bound;<br>
     R = true;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>