summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/InputSection.cpp6
-rw-r--r--lld/ELF/InputSection.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index dd8a8c61785..1e5f37b86f9 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -164,7 +164,7 @@ MergeInputSection<ELFT>::getOffset(uintX_t Offset) {
// Find the element this offset points to.
auto I = std::upper_bound(
this->Offsets.begin(), this->Offsets.end(), Offset,
- [](const uintX_t &A, const std::pair<uintX_t, uintX_t> &B) {
+ [](const uintX_t &A, const std::pair<uintX_t, size_t> &B) {
return A < B.first;
});
size_t End = I == this->Offsets.end() ? Data.size() : I->first;
@@ -173,8 +173,8 @@ MergeInputSection<ELFT>::getOffset(uintX_t Offset) {
// Compute the Addend and if the Base is cached, return.
uintX_t Addend = Offset - Start;
- uintX_t &Base = I->second;
- if (Base != uintX_t(-1))
+ size_t &Base = I->second;
+ if (Base != size_t(-1))
return Base + Addend;
// Map the base to the offset in the output section and cashe it.
diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h
index 2e245cac193..4eb95286931 100644
--- a/lld/ELF/InputSection.h
+++ b/lld/ELF/InputSection.h
@@ -84,7 +84,7 @@ template <class ELFT> class MergeInputSection : public InputSectionBase<ELFT> {
typedef typename llvm::object::ELFFile<ELFT>::Elf_Shdr Elf_Shdr;
public:
- std::vector<std::pair<uintX_t, uintX_t>> Offsets;
+ std::vector<std::pair<uintX_t, size_t>> Offsets;
MergeInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header);
static bool classof(const InputSectionBase<ELFT> *S);
// Translate an offset in the input section to an offset in the output
OpenPOWER on IntegriCloud