<div dir="ltr">Thanks, Rafael.<div><br></div><div>What platform did it fail on? I'm running x64 Ubuntu and all tests passed.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-04 22:55 GMT+03:00 Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As written this fails end.s.<br>
<br>
The attached patch includes the previous suggestions and fixes end.s.<br>
<br>
Cheers,<br>
Rafael<br>
<br>
<br>
On 4 August 2016 at 15:45, Rafael Ávila de Espíndola<br>
<div><div class="h5"><<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> rafael added inline comments.<br>
><br>
> ================<br>
> Comment at: ELF/LinkerScript.cpp:47<br>
> @@ +46,3 @@<br>
> +template <class ELFT><br>
> +static inline Symbol *addSymbolToSymtabAux(<wbr>StringRef Name, uint8_t StOther) {<br>
> +  return Symtab<ELFT>::X->addRegular(<wbr>Name, STB_GLOBAL, StOther);<br>
> ----------------<br>
> You don't need the inline.<br>
><br>
> ================<br>
> Comment at: ELF/LinkerScript.cpp:52<br>
> @@ +51,3 @@<br>
> +template <class ELFT><br>
> +static inline Symbol *addSymbolToSymtabAux(<wbr>StringRef Name,<br>
> +                                           typename ELFT::uint Value,<br>
> ----------------<br>
> Or here .<br>
><br>
> ================<br>
> Comment at: ELF/LinkerScript.cpp:59<br>
> @@ +58,3 @@<br>
> +template <class ELFT, class... ArgsT><br>
> +static void addSymbolToSymtab(<wbr>SymbolAssignment *Cmd, ArgsT... Args) {<br>
> +  if (!Cmd || Cmd->Name == ".")<br>
> ----------------<br>
> Cmd can be a reference.<br>
><br>
> ================<br>
> Comment at: ELF/LinkerScript.cpp:204<br>
> @@ -167,3 +203,3 @@<br>
><br>
> -    if (OutputName == "/DISCARD/") {<br>
> -      for (InputSectionBase<ELFT> *S : Sections) {<br>
> +  auto Add = [&](StringRef OutputName, const InputSectionDescription *I) {<br>
> +    std::vector<InputSectionBase<<wbr>ELFT> *> Sections;<br>
> ----------------<br>
> Please keep the name Cmd instead of I.<br>
><br>
> ================<br>
> Comment at: ELF/LinkerScript.cpp:206<br>
> @@ +205,3 @@<br>
> +    std::vector<InputSectionBase<<wbr>ELFT> *> Sections;<br>
> +    for (InputSectionBase<ELFT> *S : getInputSections(I)) {<br>
> +      if (OutputName == "/DISCARD/") {<br>
> ----------------<br>
> You are reverting Rui's patch in here. Please assign getInputSecitons to the Sections vector.<br>
><br>
><br>
> <a href="https://reviews.llvm.org/D22683" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D22683</a><br>
><br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>