<div dir="ltr">It is. Fixed in <span style="color:rgb(0,0,0)">r230770. Thanks!</span> <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 27, 2015 at 7:30 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Also equivalent to StringRef::find_first_of, no?<br>
<div class="HOEnZb"><div class="h5"><br>
On 26 February 2015 at 23:23, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
> Author: ruiu<br>
> Date: Thu Feb 26 22:23:21 2015<br>
> New Revision: 230729<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230729&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=230729&view=rev</a><br>
> Log:<br>
> Update comments, fix typos.<br>
><br>
> Modified:<br>
>     lld/trunk/lib/ReaderWriter/ELF/ELFFile.h<br>
>     lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp<br>
>     lld/trunk/test/elf/gnulinkonce/gnulinkonce-report-discarded-reference.test<br>
><br>
> Modified: lld/trunk/lib/ReaderWriter/ELF/ELFFile.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFFile.h?rev=230729&r1=230728&r2=230729&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFFile.h?rev=230729&r1=230728&r2=230729&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/lib/ReaderWriter/ELF/ELFFile.h (original)<br>
> +++ lld/trunk/lib/ReaderWriter/ELF/ELFFile.h Thu Feb 26 22:23:21 2015<br>
> @@ -383,7 +383,7 @@ protected:<br>
>    /// sections. They may not reference local symbols for addresses in<br>
>    /// the group's sections, including section symbols.<br>
>    /// ABI Doc : <a href="https://mentorembedded.github.io/cxx-abi/abi/prop-72-comdat.html" target="_blank">https://mentorembedded.github.io/cxx-abi/abi/prop-72-comdat.html</a><br>
> -  /// Does the atom need to be redirected using a separate undefined atom ?<br>
> +  /// Does the atom need to be redirected using a separate undefined atom?<br>
>    bool redirectReferenceUsingUndefAtom(const Elf_Sym *sourceSymbol,<br>
>                                         const Elf_Sym *targetSymbol) const;<br>
><br>
> @@ -440,7 +440,7 @@ protected:<br>
>    /// \brief the cached options relevant while reading the ELF File<br>
>    bool _doStringsMerge;<br>
><br>
> -  /// \brief Is --wrap on ?<br>
> +  /// \brief Is --wrap on?<br>
>    bool _useWrap;<br>
><br>
>    /// \brief The LinkingContext.<br>
> @@ -1166,7 +1166,7 @@ void ELFFile<ELFT>::createEdge(ELFDefine<br>
>    from->addReference(reference);<br>
>  }<br>
><br>
> -/// Does the atom need to be redirected using a separate undefined atom ?<br>
> +/// Does the atom need to be redirected using a separate undefined atom?<br>
>  template <class ELFT><br>
>  bool ELFFile<ELFT>::redirectReferenceUsingUndefAtom(<br>
>      const Elf_Sym *sourceSymbol, const Elf_Sym *targetSymbol) const {<br>
><br>
> Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=230729&r1=230728&r2=230729&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=230729&r1=230728&r2=230729&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)<br>
> +++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Thu Feb 26 22:23:21 2015<br>
> @@ -950,7 +950,7 @@ std::error_code FileCOFF::addRelocationR<br>
>    for (const auto &sec : _obj->sections()) {<br>
>      const coff_section *section = _obj->getCOFFSection(sec);<br>
><br>
> -    // Skip there's no atom for the section. Currently we do not create any<br>
> +    // Skip if there's no atom for the section. Currently we do not create any<br>
>      // atoms for some sections, such as "debug$S", and such sections need to<br>
>      // be skipped here too.<br>
>      if (_sectionAtoms.find(section) == _sectionAtoms.end())<br>
> @@ -1056,10 +1056,13 @@ StringRef FileCOFF::ArrayRefToString(Arr<br>
>    if (array.empty())<br>
>      return "";<br>
><br>
> +  // This is equivalent to strnlen, but we don't use the function because<br>
> +  // it only exists in recent POSIX standards.<br>
>    size_t len = 0;<br>
>    size_t e = array.size();<br>
>    while (len < e && array[len] != '\0')<br>
>      ++len;<br>
> +<br>
>    std::string *contents =<br>
>        new (_alloc) std::string(reinterpret_cast<const char *>(&array[0]), len);<br>
>    return StringRef(*contents).trim();<br>
><br>
> Modified: lld/trunk/test/elf/gnulinkonce/gnulinkonce-report-discarded-reference.test<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/gnulinkonce/gnulinkonce-report-discarded-reference.test?rev=230729&r1=230728&r2=230729&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/gnulinkonce/gnulinkonce-report-discarded-reference.test?rev=230729&r1=230728&r2=230729&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/test/elf/gnulinkonce/gnulinkonce-report-discarded-reference.test (original)<br>
> +++ lld/trunk/test/elf/gnulinkonce/gnulinkonce-report-discarded-reference.test Thu Feb 26 22:23:21 2015<br>
> @@ -2,7 +2,7 @@<br>
>  # appropriately. The testcase has been created by using the following source<br>
>  # code.<br>
>  # TODO: This test should produce a discarded reference error message which it<br>
> -# doesnot currently.<br>
> +# does not currently.<br>
>  # linkoncea.s<br>
>  #        .section .gnu.linkonce.d.dummy,"aw"<br>
>  #bar:<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>