summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorJérôme Vouillon <jerome.vouillon@gmail.com>2024-05-14 16:01:01 -0400
committerGitHub <noreply@github.com>2024-05-14 13:01:01 -0700
commit140386ed24ece9f30b2ad7dc55f63716f7a61f5e (patch)
treebebd167535305fbeaad79779e25ecc73b233c502 /src/wasm.h
parent55f33b55daa965672d2b8aca98ce1570e3fb52c0 (diff)
downloadbinaryen-140386ed24ece9f30b2ad7dc55f63716f7a61f5e.tar.gz
binaryen-140386ed24ece9f30b2ad7dc55f63716f7a61f5e.tar.bz2
binaryen-140386ed24ece9f30b2ad7dc55f63716f7a61f5e.zip
Source maps: Allow specifying that an expression has no debug info in text (#6520)
;;@ with nothing else (no source:line) can be used to specify that the following expression does not have any debug info associated to it. This can be used to stop the automatic propagation of debug info in the text parsers. The text printer has also been updated to output this comment when needed.
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 2f3f09ad5..dd7164499 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -2167,7 +2167,9 @@ public:
: columnNumber < other.columnNumber;
}
};
- std::unordered_map<Expression*, DebugLocation> debugLocations;
+ // One can explicitly set the debug location of an expression to
+ // nullopt to stop the propagation of debug locations.
+ std::unordered_map<Expression*, std::optional<DebugLocation>> debugLocations;
std::set<DebugLocation> prologLocation;
std::set<DebugLocation> epilogLocation;