[PATCH] D92478: [yaml2obj/obj2yaml] - Make the fields of the `Symbol` to be optional.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 06:02:09 PST 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: arphaman, hiraditya, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar requested review of this revision.

This is similar to what we did earlier for fields of the `Section` class.

When a field is optional we can use the `=<none>` syntax in macros.
I am using this functionality in the patch that going to post soon.

I've added few test cases, I am not sure if we want to test all of fields,
as handling of "Optional<>" is generic and common.


https://reviews.llvm.org/D92478

Files:
  llvm/include/llvm/ObjectYAML/ELFYAML.h
  llvm/lib/ObjectYAML/ELFEmitter.cpp
  llvm/lib/ObjectYAML/ELFYAML.cpp
  llvm/test/tools/yaml2obj/ELF/dynamic-symbols.yaml
  llvm/test/tools/yaml2obj/ELF/symbol-binding.yaml
  llvm/test/tools/yaml2obj/ELF/symbol-index.yaml
  llvm/test/tools/yaml2obj/ELF/symbol-name.yaml
  llvm/test/tools/yaml2obj/ELF/symbol-type.yaml
  llvm/tools/obj2yaml/elf2yaml.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92478.308945.patch
Type: text/x-patch
Size: 10180 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201202/416c1dc0/attachment.bin>


More information about the llvm-commits mailing list