[PATCH] D63596: [yaml2obj/obj2yaml] - Allow having the symbols and sections with duplicated names.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 05:56:25 PDT 2019


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: test/tools/obj2yaml/duplicate-symbol-and-section-names.test:4
+## names and that the suffixes produced for each section and
+## symbol reflects the index of duplication.
+
----------------
jhenderson wrote:
> reflects -> reflect
> 
> I'm not sure I understand what "index of duplication" means. Probably sufficient to say that the suffixes are unique (it really doesn't matter how they are unique e.g. with index).
> I'm not sure I understand what "index of duplication" means.

Order number of the duplication? I.e. `[1`] below means this is the first duplication for `localfoo`,
`[2]` means the second and so on.

```
# CASE1-NEXT:   - Name: localfoo
# CASE1-NEXT:   - Name: 'localfoo [1]'
# CASE1-NEXT:   - Name: 'localfoo [2]'
```

> Probably sufficient to say that the suffixes are unique

They are not. They were unique in the first versions of this patch,
but now we can have both `localfoo [1]` and `localbar [1]` for example.

> (it really doesn't matter how they are unique e.g. with index).

It does not matter for `yaml2obj`. but here we testing `obj2yaml` output,
which has a special logic to produce 
`localfoo, 'localfoo [1]', localbar, 'localbar [1]'`
instead of `localfoo, 'localfoo [1]', localbar, 'localbar [2]'`

That is what I tried to explain in the comment.

What about the following?
"and that the suffixes produced for each section and symbol shows the order number
 of the duplication"


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

https://reviews.llvm.org/D63596





More information about the llvm-commits mailing list