<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Sep 3, 2015 at 6:17 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">Another thing: I see that you moved createFile out of Driver.cpp.<br>
<br>
That is not what COFF does and I think I agree with COFF on this one.<br>
The files we will support at the top level are not the ones we support<br>
inside a .a. It is better to error early if we are given a .so or a<br>
linker script inside an archive.<br></blockquote><div><br></div><div>Yes, that's an deliberate choice that I made. A few more examples: In COFF, import files are given only as members of archive files. Both in COFF and ELF, archive files cannot be members of archive files.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
<br>
<br>
<br>
On 2 September 2015 at 16:48, Rafael Espíndola<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
> The warnings with the file kind were really an issue with the existing<br>
> code. I have fixed that and rebased your patch. I also include the<br>
> change to use  std::vector<Lazy> LazySymbols;.<br>
><br>
> The remaining warnings look like new issues:<br>
><br>
> /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:<br>
> enumeration value 'LazyKind' not handled in switch [-Wswitch]<br>
>     switch (Body->kind()) {<br>
>             ^<br>
> /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:<br>
> enumeration value 'LazyKind' not handled in switch [-Wswitch]<br>
> /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:<br>
> enumeration value 'LazyKind' not handled in switch [-Wswitch]<br>
> /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:<br>
> enumeration value 'LazyKind' not handled in switch [-Wswitch]<br>
> /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:317:13: warning:<br>
> enumeration value 'LazyKind' not handled in switch [-Wswitch<br>
><br>
> Please fix them and upload a new patch.<br>
><br>
><br>
> On 2 September 2015 at 11:50, Rafael Espíndola<br>
> <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
>> Why use a llvm::MallocAllocator? It seems better to not have an<br>
>> allocator and use a smart pointer or use a BumpPtrAllocator.<br>
>><br>
>> Given that the allocator is used for exactly one allocation per file,<br>
>> wouldn't it be the same to replace<br>
>><br>
>>   std::vector<Lazy *> LazySymbols;<br>
>>   llvm::MallocAllocator Alloc;<br>
>><br>
>> With<br>
>><br>
>>   std::vector<Lazy> LazySymbols<br>
>> ?<br>
>><br>
>> On 2 September 2015 at 11:33, Rafael Ávila de Espíndola<br>
>> <<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/InputFiles.cpp:15<br>
>>> @@ -14,2 +14,3 @@<br>
>>>  #include "llvm/ADT/STLExtras.h"<br>
>>> +#include "llvm/Support/FileSystem.h"<br>
>>><br>
>>> ----------------<br>
>>> Not used.<br>
>>><br>
>>><br>
>>> <a href="http://reviews.llvm.org/D12545" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12545</a><br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<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/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>