[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 12:32:54 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL251644: [ELF2] merge-string.s test fixed for win32 configuration. (authored by grimar).

Changed prior to commit:
  http://reviews.llvm.org/D14171?vs=38745&id=38756#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14171

Files:
  lld/trunk/ELF/InputSection.cpp
  lld/trunk/ELF/InputSection.h

Index: lld/trunk/ELF/InputSection.cpp
===================================================================
--- lld/trunk/ELF/InputSection.cpp
+++ lld/trunk/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.
Index: lld/trunk/ELF/InputSection.h
===================================================================
--- lld/trunk/ELF/InputSection.h
+++ lld/trunk/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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14171.38756.patch
Type: text/x-patch
Size: 1492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151029/41954129/attachment.bin>


More information about the llvm-commits mailing list