[PATCH] D68848: [llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 00:24:12 PDT 2019
grimar accepted this revision.
grimar added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:376
+ // increment so the indexing is stable.
+ return {/*Keep=*/is_contained(FilterSections, SecName),
+ /*IncrementIndex=*/true};
----------------
rupprecht wrote:
> grimar wrote:
> > Can we have a test for this logic? I.e. for a case when `Keep=false`, `IncrementIndex=true`.
> > (Doesn't seem we have it)
> This is already covered by `llvm/test/tools/llvm-objdump/X86/section-index.s`:
>
> ```
> # RUN: llvm-objdump -section-headers %t | FileCheck %s
> ...
> # CHECK-NEXT: 4 .bar
>
> # RUN: llvm-objdump -section-headers -section=.bar %t \
> # RUN: | FileCheck %s --check-prefix=BAR
> ...
> # BAR-NEXT: 4 .bar
> ```
>
> I'll mention this in the patch description.
Ah, OK.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68848/new/
https://reviews.llvm.org/D68848
More information about the llvm-commits
mailing list