From 5a7ca96e2d75700be61dd9c038a72a5df1767149 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 28 Mar 2018 02:32:31 +0000 Subject: [PATCH] Store live offsets as uint32_t. We don't support input merge sections larger than 4gb, so these can be uint32_t. llvm-svn: 328684 --- lld/ELF/InputSection.cpp | 2 +- lld/ELF/InputSection.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 5964c86fe00a..9109ced45e8d 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -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; } diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index 08c12f409854..ab6158018092 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -262,7 +262,7 @@ private: mutable llvm::DenseMap OffsetMap; mutable llvm::once_flag InitOffsetMap; - llvm::DenseSet LiveOffsets; + llvm::DenseSet LiveOffsets; }; struct EhSectionPiece {