diff options
Diffstat (limited to 'third_party/llvm-project/dwarf2yaml.cpp')
-rw-r--r-- | third_party/llvm-project/dwarf2yaml.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/llvm-project/dwarf2yaml.cpp b/third_party/llvm-project/dwarf2yaml.cpp index bdaf1e429..7d5f2e048 100644 --- a/third_party/llvm-project/dwarf2yaml.cpp +++ b/third_party/llvm-project/dwarf2yaml.cpp @@ -146,7 +146,9 @@ void dumpDebugInfo(DWARFContext &DCtx, DWARFYAML::Data &Y) { NewUnit.Version = CU->getVersion(); if(NewUnit.Version >= 5) NewUnit.Type = (dwarf::UnitType)CU->getUnitType(); - NewUnit.AbbrOffset = CU->getAbbreviations()->getOffset(); + if (auto* Abbreviations = CU->getAbbreviations()) { // XXX BINARYEN + NewUnit.AbbrOffset = Abbreviations->getOffset(); + } NewUnit.AddrSize = CU->getAddressByteSize(); for (auto DIE : CU->dies()) { DWARFYAML::Entry NewEntry; |