diff options
Diffstat (limited to 'third_party/llvm-project/dwarf2yaml.cpp')
-rw-r--r-- | third_party/llvm-project/dwarf2yaml.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/third_party/llvm-project/dwarf2yaml.cpp b/third_party/llvm-project/dwarf2yaml.cpp index b43b0e420..52e875637 100644 --- a/third_party/llvm-project/dwarf2yaml.cpp +++ b/third_party/llvm-project/dwarf2yaml.cpp @@ -43,6 +43,14 @@ void dumpDebugAbbrev(DWARFContext &DCtx, DWARFYAML::Data &Y) { } Y.AbbrevDecls.push_back(Abbrv); } + // XXX BINARYEN: null-terminate the DeclSet. This is needed to separate + // DeclSets from each other, and to null-terminate the entire list + // (LLVM works with or without this, but other decoders may error, see + // https://bugs.llvm.org/show_bug.cgi?id=44511). + DWARFYAML::Abbrev Abbrv; + Abbrv.Code = 0; + Abbrv.Tag = dwarf::Tag(0); + Y.AbbrevDecls.push_back(Abbrv); } } } |