[all-commits] [llvm/llvm-project] e2b134: [yaml2obj] - Stop using square brackets for unique...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Tue May 19 03:00:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e2b134b01a6b1a201015c69ef83fe1861dd1139b
      https://github.com/llvm/llvm-project/commit/e2b134b01a6b1a201015c69ef83fe1861dd1139b
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-05-19 (Tue, 19 May 2020)

  Changed paths:
    M llvm/include/llvm/ObjectYAML/ELFYAML.h
    M llvm/lib/ObjectYAML/ELFEmitter.cpp
    M llvm/test/Object/X86/obj2yaml-dup-section-name.s
    M llvm/test/tools/llvm-dwarfdump/X86/section_sizes_elf.test
    M llvm/test/tools/llvm-gsymutil/X86/elf-dwarf.yaml
    M llvm/test/tools/llvm-objcopy/ELF/strip-dwo-groups.test
    M llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
    M llvm/test/tools/obj2yaml/ELF/duplicate-symbol-and-section-names.yaml
    M llvm/test/tools/obj2yaml/ELF/program-headers.yaml
    M llvm/test/tools/yaml2obj/ELF/call-graph-profile-section.yaml
    M llvm/test/tools/yaml2obj/ELF/duplicate-section-names.yaml
    M llvm/test/tools/yaml2obj/ELF/duplicate-symbol-names.yaml
    M llvm/test/tools/yaml2obj/ELF/stack-sizes.yaml
    M llvm/tools/obj2yaml/elf2yaml.cpp

  Log Message:
  -----------
  [yaml2obj] - Stop using square brackets for unique suffixes.

For describing section/symbol names we can use unique suffixes,
e.g:

```
- Name: '.foo [1]`
- Name: '.foo [2]`
```

It can be a problem (see https://reviews.llvm.org/D79984#inline-734829),
because `[]` are sometimes used to describe a macros:

```
- Name: "[[a0]]"
```

Seems the better approach is to use something else, like "()".
This patch does it and refactors the code related.

Differential revision: https://reviews.llvm.org/D80123




More information about the All-commits mailing list