[lld] r253043 - [ELF2] - fix of eh-frame-merge.s and eh-frame-merge.s tests fails for win32 configuration.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 05:45:00 PST 2015


Author: grimar
Date: Fri Nov 13 07:44:59 2015
New Revision: 253043

URL: http://llvm.org/viewvc/llvm-project?rev=253043&view=rev
Log:
[ELF2] - fix of eh-frame-merge.s and eh-frame-merge.s tests fails for win32 configuration.

Modified:
    lld/trunk/ELF/InputSection.cpp
    lld/trunk/ELF/OutputSections.cpp

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=253043&r1=253042&r2=253043&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Fri Nov 13 07:44:59 2015
@@ -192,7 +192,7 @@ typename EHInputSection<ELFT>::uintX_t
 EHInputSection<ELFT>::getOffset(uintX_t Offset) {
   std::pair<uintX_t, uintX_t> *I = this->getRangeAndSize(Offset).first;
   uintX_t Base = I->second;
-  if (Base == size_t(-1))
+  if (Base == uintX_t(-1))
     return -1; // Not in the output
 
   uintX_t Addend = Offset - I->first;
@@ -234,7 +234,7 @@ SplitInputSection<ELFT>::getRangeAndSize
 template <class ELFT>
 typename MergeInputSection<ELFT>::uintX_t
 MergeInputSection<ELFT>::getOffset(uintX_t Offset) {
-  std::pair<std::pair<uintX_t, uintX_t> *, size_t> T =
+  std::pair<std::pair<uintX_t, uintX_t> *, uintX_t> T =
       this->getRangeAndSize(Offset);
   std::pair<uintX_t, uintX_t> *I = T.first;
   uintX_t End = T.second;

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=253043&r1=253042&r2=253043&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri Nov 13 07:44:59 2015
@@ -1053,7 +1053,7 @@ void MergeOutputSection<ELFT>::addSectio
       if (End == StringRef::npos)
         error("String is not null terminated");
       StringRef Entry = Data.substr(0, End + EntSize);
-      size_t OutputOffset = Builder.add(Entry);
+      uintX_t OutputOffset = Builder.add(Entry);
       if (shouldTailMerge())
         OutputOffset = -1;
       S->Offsets.push_back(std::make_pair(Offset, OutputOffset));




More information about the llvm-commits mailing list