[lld] r328684 - Store live offsets as uint32_t.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 27 19:32:31 PDT 2018
Author: rafael
Date: Tue Mar 27 19:32:31 2018
New Revision: 328684
URL: http://llvm.org/viewvc/llvm-project?rev=328684&view=rev
Log:
Store live offsets as uint32_t.
We don't support input merge sections larger than 4gb, so these can be
uint32_t.
Modified:
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/InputSection.h
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=328684&r1=328683&r2=328684&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Tue Mar 27 19:32:31 2018
@@ -921,7 +921,7 @@ void MergeInputSection::splitIntoPieces(
splitNonStrings(Data, Entsize);
if (Config->GcSections && (Flags & SHF_ALLOC))
- for (uint64_t Off : LiveOffsets)
+ for (uint32_t Off : LiveOffsets)
getSectionPiece(Off)->Live = true;
}
Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=328684&r1=328683&r2=328684&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Tue Mar 27 19:32:31 2018
@@ -262,7 +262,7 @@ private:
mutable llvm::DenseMap<uint32_t, uint32_t> OffsetMap;
mutable llvm::once_flag InitOffsetMap;
- llvm::DenseSet<uint64_t> LiveOffsets;
+ llvm::DenseSet<uint32_t> LiveOffsets;
};
struct EhSectionPiece {
More information about the llvm-commits
mailing list