[PATCH] D45214: Inline initOffsetMap
    Rafael Avila de Espindola via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Apr  3 11:02:32 PDT 2018
    
    
  
espindola added inline comments.
================
Comment at: ELF/SyntheticSections.cpp:2445
+      SectionPiece &P = Sec->Pieces[I];
+      Sec->OffsetMap[P.InputOff] = I;
+      if (P.Live)
----------------
ruiu wrote:
> Shouldn't this line be in the following `if`?
No, we want the map to include dead pieces so that we can find that they are dead without a binary search.
That was the case before this patch too.
https://reviews.llvm.org/D45214
    
    
More information about the llvm-commits
mailing list