diff options
| author | Chris Bieneman <beanz@apple.com> | 2017-03-07 18:50:58 +0000 |
|---|---|---|
| committer | Chris Bieneman <beanz@apple.com> | 2017-03-07 18:50:58 +0000 |
| commit | b3ca711ab38eee12bddb6275967d739c05b73dc1 (patch) | |
| tree | 15259297ba7f355d77a6806166ac53030da9411e /llvm/tools | |
| parent | 44296ea4db3e5055bd4c7ae5da31be285dc7ac34 (diff) | |
| download | bcm5719-llvm-b3ca711ab38eee12bddb6275967d739c05b73dc1.tar.gz bcm5719-llvm-b3ca711ab38eee12bddb6275967d739c05b73dc1.zip | |
[ObjectYAML] Add support for DWARF5 Unit header
In DWARF5 the Unit header added a new field, UnitType, and swapped the order of the address size and abbreviation offset fields.
llvm-svn: 297183
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/obj2yaml/dwarf2yaml.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/tools/obj2yaml/dwarf2yaml.cpp b/llvm/tools/obj2yaml/dwarf2yaml.cpp index db34c37873a..d41b44c0681 100644 --- a/llvm/tools/obj2yaml/dwarf2yaml.cpp +++ b/llvm/tools/obj2yaml/dwarf2yaml.cpp @@ -116,6 +116,8 @@ void dumpDebugInfo(DWARFContextInMemory &DCtx, DWARFYAML::Data &Y) { DWARFYAML::Unit NewUnit; NewUnit.Length.setLength(CU->getLength()); NewUnit.Version = CU->getVersion(); + if(NewUnit.Version >= 5) + NewUnit.Type = (dwarf::UnitType)CU->getUnitType(); NewUnit.AbbrOffset = CU->getAbbreviations()->getOffset(); NewUnit.AddrSize = CU->getAddressByteSize(); for (auto DIE : CU->dies()) { |

