[DWARFYAML][debug_info] Make the 'Values' field optional.
authorXing GUO <higuoxing@gmail.com>
Thu, 6 Aug 2020 12:41:12 +0000 (20:41 +0800)
committerXing GUO <higuoxing@gmail.com>
Thu, 6 Aug 2020 12:43:52 +0000 (20:43 +0800)
commit40506d5e2fc5fb47badcb79a8ad9242c3bce60f3
treebd1c9a49860b7d7e819341fc6a70af3857118f73
parent6616d84ceed9869a8044c590ff12865ef2ea74d6
[DWARFYAML][debug_info] Make the 'Values' field optional.

This patch makes the 'Values' field optional. This is useful when we
handcraft the terminating entry of DIEs.

```
debug_info:
  - Version:  4
    ...
    Entries:
      - AbbrCode: 1
        Values:
          - Value: 0x1234
      - AbbrCode: 0 ## Termination
```

Reviewed By: jhenderson, grimar

Differential Revision: https://reviews.llvm.org/D85397
llvm/lib/ObjectYAML/DWARFYAML.cpp
llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml
llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml