[PATCH] D74611: [obj2yaml][WIP] - Fix indentations in the ELF output.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 14 06:51:16 PST 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added a project: LLVM.

This is as about the problem D73045 <https://reviews.llvm.org/D73045> tried to solve,
but I suggest a completely different approach.

What if we just do a post processing for the output?
I.e. first output it to a string and then using our knowledge
about YAML grammar will reformat indentations.

It separates the formatting pass from the original pass,
what makes the whole approach isolated and simple.

This patch is not polished yet, it is to demonstrate the idea.
If the idea looks fine, I'll add more tests, comments and try
to improve the code.


https://reviews.llvm.org/D74611

Files:
  llvm/test/tools/obj2yaml/elf-output-indentation.yaml
  llvm/tools/obj2yaml/obj2yaml.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74611.244651.patch
Type: text/x-patch
Size: 4476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200214/8665efab/attachment.bin>


More information about the llvm-commits mailing list