[lld] r303805 - Fix the sanitizer-windows bot.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 13:32:23 PDT 2017


Author: ruiu
Date: Wed May 24 15:32:23 2017
New Revision: 303805

URL: http://llvm.org/viewvc/llvm-project?rev=303805&view=rev
Log:
Fix the sanitizer-windows bot.

Looks like r303801 broke the sanitizer-windows bot. I don't fully
understand what is going on, so I'll partially revert that patch.

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=303805&r1=303804&r2=303805&view=diff
==============================================================================
--- lld/trunk/COFF/ICF.cpp (original)
+++ lld/trunk/COFF/ICF.cpp Wed May 24 15:32:23 2017
@@ -204,10 +204,15 @@ void ICF::forEachClass(std::function<voi
 // contents and relocations are all the same.
 void ICF::run(const std::vector<Chunk *> &Vec) {
   // Collect only mergeable sections and group by hash value.
-  for (Chunk *C : Vec)
-    if (auto *SC = dyn_cast<SectionChunk>(C))
+  uint32_t NextId = 1;
+  for (Chunk *C : Vec) {
+    if (auto *SC = dyn_cast<SectionChunk>(C)) {
       if (isEligible(SC))
         Chunks.push_back(SC);
+      else
+        SC->Class[0] = NextId++;
+    }
+  }
 
   // Initially, we use hash values to partition sections.
   for (SectionChunk *SC : Chunks)




More information about the llvm-commits mailing list