[all-commits] [llvm/llvm-project] 6e779e: [ObjectYAML] - Redefine LLVM_YAML_IS_SEQUENCE_VECT...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Wed Oct 30 08:18:16 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e779e953e9d526e215e64bd1c8ebba8db0b44fe
      https://github.com/llvm/llvm-project/commit/6e779e953e9d526e215e64bd1c8ebba8db0b44fe
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M llvm/include/llvm/ObjectYAML/DWARFYAML.h
    M llvm/include/llvm/Support/YAMLTraits.h
    M llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
    M llvm/test/ObjectYAML/MachO/DWARF2-AddrSize8-FormValues.yaml
    M llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml
    M llvm/test/ObjectYAML/MachO/bind_opcode.yaml
    M llvm/test/ObjectYAML/MachO/bogus_load_command.yaml
    M llvm/test/ObjectYAML/MachO/lazy_bind_opcode.yaml
    M llvm/test/ObjectYAML/MachO/out_of_order_linkedit.yaml
    M llvm/test/ObjectYAML/MachO/rebase_opcode.yaml
    M llvm/test/ObjectYAML/MachO/weak_bind_opcode.yaml
    M llvm/unittests/Support/YAMLIOTest.cpp

  Log Message:
  -----------
  [ObjectYAML] - Redefine LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::Hex*) as LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR.

I am using it in https://reviews.llvm.org/D69399.

This change changes how obj2yaml dumps arrays of `llvm::yaml::Hex8/llvm::yaml::Hex16/llvm::yaml::Hex32`
from:

```
PayloadBytes:
- 0x01
- 0x02
...
```

To

```
PayloadBytes:    [ 0x01, 0x02, ... ]
```

The latter way is shorter and looks better for arrays.

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




More information about the All-commits mailing list