[lld] r248580 - COFF: Fix local varaible type.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 09:38:14 PDT 2015


Author: ruiu
Date: Fri Sep 25 11:38:13 2015
New Revision: 248580

URL: http://llvm.org/viewvc/llvm-project?rev=248580&view=rev
Log:
COFF: Fix local varaible type.

This is intended to be 64-bit integer, but size_t is not guranteed
to be the same or larger type than uint64_t.

Modified:
    lld/trunk/COFF/ICF.cpp

Modified: lld/trunk/COFF/ICF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/ICF.cpp?rev=248580&r1=248579&r2=248580&view=diff
==============================================================================
--- lld/trunk/COFF/ICF.cpp (original)
+++ lld/trunk/COFF/ICF.cpp Fri Sep 25 11:38:13 2015
@@ -156,7 +156,7 @@ bool ICF::partition(ChunkIterator Begin,
     });
     if (Bound == End)
       return R;
-    size_t ID = NextID++;
+    uint64_t ID = NextID++;
     std::for_each(It, Bound, [&](SectionChunk *SC) { SC->GroupID = ID; });
     It = Bound;
     R = true;




More information about the llvm-commits mailing list