summaryrefslogtreecommitdiff
path: root/third_party/llvm-project/include/llvm/ObjectYAML
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-01-28 09:31:13 -0800
committerGitHub <noreply@github.com>2020-01-28 09:31:13 -0800
commitb00f7f9b97631b214eff177b92639df6307db286 (patch)
treef94f584c5fc4af7bd44c0f8d23ba03319650bd9c /third_party/llvm-project/include/llvm/ObjectYAML
parentbfff812cdfe3caccbceee73cee168326d4b9dc63 (diff)
downloadbinaryen-b00f7f9b97631b214eff177b92639df6307db286.tar.gz
binaryen-b00f7f9b97631b214eff177b92639df6307db286.tar.bz2
binaryen-b00f7f9b97631b214eff177b92639df6307db286.zip
DWARF: Update DW_AT_stmt_list which are offsets into the debug_line section (#2628)
The debug_line section is the only one in which we change sizes and so must update offsets. It turns out that there are such offsets, DW_AT_stmt_list, so without updating them we can't handle multi-unit dwarf files.
Diffstat (limited to 'third_party/llvm-project/include/llvm/ObjectYAML')
-rw-r--r--third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h b/third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h
index b4d62f44d..2be618677 100644
--- a/third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h
+++ b/third_party/llvm-project/include/llvm/ObjectYAML/DWARFEmitter.h
@@ -38,6 +38,10 @@ void EmitPubSection(raw_ostream &OS, const PubSection &Sect,
bool IsLittleEndian);
void EmitDebugInfo(raw_ostream &OS, const Data &DI);
void EmitDebugLine(raw_ostream &OS, const Data &DI);
+// XXX BINARYEN: Same as EmitDebugLine but also update the Length field in
+// the YAML as we write. We use that information to update
+// offsets into the debug line section.
+void ComputeDebugLine(Data &DI, std::vector<size_t>& computedLengths);
Expected<StringMap<std::unique_ptr<MemoryBuffer>>>
EmitDebugSections(StringRef YAMLString, bool ApplyFixups = false,