summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-debug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-debug.cpp')
-rw-r--r--src/wasm/wasm-debug.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wasm/wasm-debug.cpp b/src/wasm/wasm-debug.cpp
index 2c5ed9515..867f4b14b 100644
--- a/src/wasm/wasm-debug.cpp
+++ b/src/wasm/wasm-debug.cpp
@@ -86,6 +86,10 @@ void dumpDWARF(const Module& wasm) {
info.context->dump(llvm::outs(), options);
}
+bool shouldPreserveDWARF(PassOptions& options, Module& wasm) {
+ return options.debugInfo && hasDWARFSections(wasm);
+}
+
//
// Big picture: We use a DWARFContext to read data, then DWARFYAML support
// code to write it. That is not the main LLVM Dwarf code used for writing
@@ -1091,6 +1095,8 @@ void writeDWARFSections(Module& wasm, const BinaryLocations& newLocations) {
std::cerr << "warning: no DWARF updating support present\n";
}
+bool shouldPreserveDWARF(PassOptions& options, Module& wasm) { return false; }
+
#endif // BUILD_LLVM_DWARF
} // namespace Debug