[MachOYAML] Allow handcrafting custom contents for DWARF sections.
authorXing GUO <higuoxing@gmail.com>
Fri, 4 Sep 2020 14:41:25 +0000 (22:41 +0800)
committerXing GUO <higuoxing@gmail.com>
Fri, 4 Sep 2020 14:42:45 +0000 (22:42 +0800)
commit2966d6e80b77c97f65805920d4d3288885de53c9
tree79b4c078ac55c124b14b94f651747a9acd331cc9
parent3404add4684d5959d1ed997149d9896d136d4d3c
[MachOYAML] Allow handcrafting custom contents for DWARF sections.

This patch enables users to handcraft custom contents for DWARF
sections. If we specify the contents of DWARF sections both in the
'DWARF' entry and the 'content', yaml2obj will emit an error message.
In addition, this patch helps remove the restriction that only the
content of sections whose segname are __DWARF can be specified in the
"DWARF" entry.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D87126
llvm/lib/ObjectYAML/MachOEmitter.cpp
llvm/test/ObjectYAML/MachO/DWARF-debug_ranges.yaml
llvm/test/ObjectYAML/MachO/dwarf-content-conflict.yaml [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
llvm/test/tools/obj2yaml/MachO/unrecognized-debug-section.yaml