[yaml2obj] - Make `Section::Link` field to be `Optional<>`.
authorGeorgii Rymar <grimar@accesssoftek.com>
Thu, 29 Oct 2020 13:04:45 +0000 (16:04 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Fri, 30 Oct 2020 13:18:53 +0000 (16:18 +0300)
commit2bfaf19516d6eb7fb94b736b091149952bae00f3
tree96cc8614c7edec81d3e7ef75aea563e0ee3d43f9
parent13bfd89c4962e738cbe50662013267b33a678b8f
[yaml2obj] - Make `Section::Link` field to be `Optional<>`.

`Link` is not an optional field currently.
Because of this it is not convenient to write macros.

This makes it optional and fixes corresponding test cases.

Differential revision: https://reviews.llvm.org/D90390
llvm/include/llvm/ObjectYAML/ELFYAML.h
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/llvm-readobj/ELF/relr-relocs.test
llvm/test/tools/obj2yaml/ELF/DWARF/debug-addr.yaml
llvm/test/tools/obj2yaml/ELF/DWARF/debug-aranges.yaml
llvm/test/tools/obj2yaml/ELF/DWARF/debug-ranges.yaml
llvm/test/tools/obj2yaml/ELF/DWARF/debug-str.yaml
llvm/test/tools/yaml2obj/ELF/dynsym-section.yaml
llvm/tools/obj2yaml/elf2yaml.cpp