<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 16, 2015 at 3:43 PM, Hal Finkel via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">----- Original Message -----<br>
> From: "Rafael Espíndola" <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>><br>
> To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>><br>
> Cc: "llvm-commits" <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>><br>
</span><span class="">> Sent: Friday, October 16, 2015 5:40:49 PM<br>
> Subject: Re: [lld] r250555 - [ELF2] getLocalRelTarget should handle R_PPC64_TOC directly<br>
><br>
</span><span class="">> > When why does the code in RelocationSection<ELFT>::writeTo have<br>
> > this?<br>
> ><br>
> >   bool IsMips64EL = Relocs[0].C.getFile()->getObj().isMips64EL();<br>
> ><br>
> > I thought this might return a different result from<br>
> > File.getObj().isMips64EL() [but then forgot to ask].<br>
><br>
> The code is there just to factor out IsMips64EL. The value will be<br>
> the<br>
> same for every reloc, so this puts the boring code out of the way.<br>
<br>
</span>Sure, but is IsMips64EL = Relocs[0].C.getFile()->getObj().isMips64EL() == File.getObj().isMips64EL() always true?<br></blockquote><div><br></div><div>If Mips64EL is true for one file, all files are Mips64EL, and vice versa. We can make it a global configuration. </div></div></div></div>