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.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/wasm/wasm-debug.cpp b/src/wasm/wasm-debug.cpp
index 60e97a27e..23c2dc938 100644
--- a/src/wasm/wasm-debug.cpp
+++ b/src/wasm/wasm-debug.cpp
@@ -29,9 +29,7 @@ std::error_code dwarf2yaml(llvm::DWARFContext& DCtx, llvm::DWARFYAML::Data& Y);
#include "wasm-debug.h"
#include "wasm.h"
-namespace wasm {
-
-namespace Debug {
+namespace wasm::Debug {
bool isDWARFSection(Name name) { return name.startsWith(".debug_"); }
@@ -372,11 +370,11 @@ struct AddrExprMap {
// Construct the map from the binaryLocations loaded from the wasm.
AddrExprMap(const Module& wasm) {
for (auto& func : wasm.functions) {
- for (auto pair : func->expressionLocations) {
- add(pair.first, pair.second);
+ for (auto& [expr, span] : func->expressionLocations) {
+ add(expr, span);
}
- for (auto pair : func->delimiterLocations) {
- add(pair.first, pair.second);
+ for (auto& [expr, delim] : func->delimiterLocations) {
+ add(expr, delim);
}
}
}
@@ -1105,6 +1103,4 @@ bool shouldPreserveDWARF(PassOptions& options, Module& wasm) { return false; }
#endif // BUILD_LLVM_DWARF
-} // namespace Debug
-
-} // namespace wasm
+} // namespace wasm::Debug