[PATCH] D94560: [ELF] report section sizes when output file too large

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 18 00:44:49 PST 2021


jhenderson added a comment.

In D94560#2504184 <https://reviews.llvm.org/D94560#2504184>, @grimar wrote:

> In D94560#2502703 <https://reviews.llvm.org/D94560#2502703>, @inglorion wrote:
>
>> Thanks again.
>>
>> I chose DAG on purpose because I think it more accurately expresses what we're really asserting.
>>
>> First, we since we removed the sorting, we're not guaranteeing that these will be in any particular order. Given that, I would rather not make the test depend on the order.
>
> Actually we give a guarantee: the order of output sections must be stable. When using `-NEXT` we verify that we print section sizes in the same order as they present in the file.
> Using `-DAG` relaxes this check. Also, the current version of the test case looks like we have a sorting, though we don't.
>
> So, personally I also think that using `-NEXT` is would be better here. Also wonder what @jhenderson thinks.

I think there are arguments for both sides, and I'm on the fence as to which is better in this case. If I were writing this myself, I'd probably have gone with `-NEXT` on the basis that we want to test the output is exactly what we expected to produce (no more, no less).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94560/new/

https://reviews.llvm.org/D94560



More information about the llvm-commits mailing list