Use uintX_t instead of unsigned.
This fixes a potential bug when cross linking very large executables
on LLP64 machines such as Windows. On such platform, uintX_t is 64 bits
while unsigned is 32 bits.
llvm-svn: 270327
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 1f08db2..b16035b 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -1140,7 +1140,7 @@
ArrayRef<uint8_t> D = S->getSectionData();
uintX_t Offset = 0;
- DenseMap<unsigned, unsigned> OffsetToIndex;
+ DenseMap<uintX_t, uintX_t> OffsetToIndex;
while (!D.empty()) {
unsigned Index = S->Offsets.size();
S->Offsets.push_back(std::make_pair(Offset, -1));