[PATCH] D14171: [ELF2] merge-string.s test fixed for win32 configuraton.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 29 10:10:34 PDT 2015
grimar updated this revision to Diff 38745.
grimar added a comment.
Review comment addressed.
http://reviews.llvm.org/D14171
Files:
ELF/InputSection.cpp
ELF/InputSection.h
Index: ELF/InputSection.h
===================================================================
--- ELF/InputSection.h
+++ ELF/InputSection.h
@@ -84,7 +84,7 @@
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
Index: ELF/InputSection.cpp
===================================================================
--- ELF/InputSection.cpp
+++ ELF/InputSection.cpp
@@ -164,17 +164,17 @@
// 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;
--I;
uintX_t Start = I->first;
// 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14171.38745.patch
Type: text/x-patch
Size: 1432 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151029/23b93f66/attachment.bin>
More information about the llvm-commits
mailing list