<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">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><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><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">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></div><br></div></div>