[lld] r300445 - [ELF] - Add compress-debug-output-i386.s testcase.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 04:44:33 PDT 2017


You wrote different code for 32-bit than 64-bit, and that is why you needed
it. I'm going to fix it and remove this test.

On Wed, Apr 19, 2017 at 4:29 AM, George Rimar <grimar at accesssoftek.com>
wrote:

> ​> Please revert this file. The -compress-debug-section flag is not an
> architecture-dependent feature. One test is enough.
>
> But compressed section header is different for 32/64 bit. In current code
> without the test, else branch is uncovered:
>
>   if (Config->Is64) {
>     Buf += sizeof(Elf64_Word); // Skip ch_reserved field.
>     write64<E>(Buf, Size);
>     Buf += sizeof(ELFT::Chdr::ch_size);
>     write64<E>(Buf, Alignment);
>     Buf += sizeof(ELFT::Chdr::ch_addralign);
>   } else {
>     write32<E>(Buf, Size);
>     Buf += sizeof(ELFT::Chdr::ch_size);
>     write32<E>(Buf, Alignment);
>     Buf += sizeof(ELFT::Chdr::ch_addralign);
>   }​
>
> George.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170419/1ba48804/attachment.html>


More information about the llvm-commits mailing list