[lld] r199233 - [ELF] Fix type of the DefaultLayout::segments() return value. This

Simon Atanasyan simon at atanasyan.com
Tue Jan 14 10:19:02 PST 2014


Author: atanasyan
Date: Tue Jan 14 12:19:02 2014
New Revision: 199233

URL: http://llvm.org/viewvc/llvm-project?rev=199233&view=rev
Log:
[ELF] Fix type of the DefaultLayout::segments() return value. This
method returns the DefaultLayout::_segments field. The type of this field is
a vector of Segment<ELFT>* pointers. This type cannot be implicitly casted to
the range<ChunkIter>.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h

Modified: lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=199233&r1=199232&r2=199233&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h Tue Jan 14 12:19:02 2014
@@ -115,6 +115,8 @@ public:
   };
 
   typedef typename std::vector<Chunk<ELFT> *>::iterator ChunkIter;
+  typedef typename std::vector<Segment<ELFT> *>::iterator SegmentIter;
+
   // The additional segments are used to figure out
   // if there is a segment by that type already created
   // For example : PT_TLS, we have two sections .tdata/.tbss
@@ -251,7 +253,7 @@ public:
 
   inline range<ChunkIter> sections() { return _sections; }
 
-  inline range<ChunkIter> segments() { return _segments; }
+  inline range<SegmentIter> segments() { return _segments; }
 
   inline ELFHeader<ELFT> *getHeader() { return _elfHeader; }
 





More information about the llvm-commits mailing list