summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2017-03-07 18:50:58 +0000
committerChris Bieneman <beanz@apple.com>2017-03-07 18:50:58 +0000
commitb3ca711ab38eee12bddb6275967d739c05b73dc1 (patch)
tree15259297ba7f355d77a6806166ac53030da9411e /llvm/tools
parent44296ea4db3e5055bd4c7ae5da31be285dc7ac34 (diff)
downloadbcm5719-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.cpp2
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()) {
OpenPOWER on IntegriCloud