Replace size_t with uintX_t in a few places.
If linking a 32 bit binary, these values must fit in 32 bits.
llvm-svn: 252739
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 9d962dc..5991563 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -173,13 +173,13 @@
[](const uintX_t &A, const std::pair<uintX_t, size_t> &B) {
return A < B.first;
});
- size_t End = I == Offsets.end() ? Data.size() : I->first;
+ uintX_t End = I == Offsets.end() ? Data.size() : I->first;
--I;
uintX_t Start = I->first;
// Compute the Addend and if the Base is cached, return.
uintX_t Addend = Offset - Start;
- size_t &Base = I->second;
+ uintX_t &Base = I->second;
if (Base != size_t(-1))
return Base + Addend;