[lld] r241075 - Update for llvm change.

David Blaikie dblaikie at gmail.com
Tue Jun 30 10:00:25 PDT 2015


On Tue, Jun 30, 2015 at 8:34 AM, Rafael Espindola <
rafael.espindola at gmail.com> wrote:

> Author: rafael
> Date: Tue Jun 30 10:34:00 2015
> New Revision: 241075
>
> URL: http://llvm.org/viewvc/llvm-project?rev=241075&view=rev
> Log:
> Update for llvm change.
>
> Modified:
>     lld/trunk/lib/ReaderWriter/ELF/DynamicFile.cpp
>     lld/trunk/lib/ReaderWriter/ELF/ELFFile.cpp
>
> Modified: lld/trunk/lib/ReaderWriter/ELF/DynamicFile.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DynamicFile.cpp?rev=241075&r1=241074&r2=241075&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/ELF/DynamicFile.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/ELF/DynamicFile.cpp Tue Jun 30 10:34:00 2015
> @@ -68,7 +68,7 @@ template <class ELFT> std::error_code Dy
>    // Create a map from names to dynamic symbol table entries.
>    // TODO: This should use the object file's build in hash table instead
> if
>    // it exists.
> -  for (auto i = obj.begin_dynamic_symbols(), e =
> obj.end_dynamic_symbols();
> +  for (auto i = obj.dynamic_symbol_begin(), e = obj.dynamic_symbol_end();
>         i != e; ++i) {
>      auto name = obj.getSymbolName(i, true);
>      if ((ec = name.getError()))
>
> Modified: lld/trunk/lib/ReaderWriter/ELF/ELFFile.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFFile.cpp?rev=241075&r1=241074&r2=241075&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/ELF/ELFFile.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/ELF/ELFFile.cpp Tue Jun 30 10:34:00 2015
> @@ -140,8 +140,8 @@ std::error_code ELFFile<ELFT>::createAto
>        if (std::error_code ec = sectionName.getError())
>          return ec;
>
> -      auto rai(_objFile->begin_rela(&section));
> -      auto rae(_objFile->end_rela(&section));
> +      auto rai(_objFile->rela_begin(&section));
> +      auto rae(_objFile->rela_end(&section));
>

Generally it'd be nice to prefer copy init (auto x = y;) over direct init
(auto x(y);), btw.


>
>        _relocationAddendReferences[sHdr] = make_range(rai, rae);
>        totalRelocs += std::distance(rai, rae);
> @@ -152,8 +152,8 @@ std::error_code ELFFile<ELFT>::createAto
>        if (std::error_code ec = sectionName.getError())
>          return ec;
>
> -      auto ri(_objFile->begin_rel(&section));
> -      auto re(_objFile->end_rel(&section));
> +      auto ri(_objFile->rel_begin(&section));
> +      auto re(_objFile->rel_end(&section));
>
>        _relocationReferences[sHdr] = make_range(ri, re);
>        totalRelocs += std::distance(ri, re);
> @@ -210,7 +210,7 @@ template <class ELFT>
>  std::error_code ELFFile<ELFT>::createSymbolsFromAtomizableSections() {
>    // Increment over all the symbols collecting atoms and symbol names for
>    // later use.
> -  auto SymI = _objFile->begin_symbols(), SymE = _objFile->end_symbols();
> +  auto SymI = _objFile->symbol_begin(), SymE = _objFile->symbol_end();
>
>    // Skip over dummy sym.
>    if (SymI != SymE)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150630/5b2a3093/attachment.html>


More information about the llvm-commits mailing list