summaryrefslogtreecommitdiff
path: root/src/wasm-ir-builder.h
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-04-16 16:27:50 -0700
committerGitHub <noreply@github.com>2024-04-16 16:27:50 -0700
commitd8dc55ceafff2c3b92d7d3e6434d56d346f8913b (patch)
tree0ccde7ed745a2d3fc54358cfadb2b38d933a5b36 /src/wasm-ir-builder.h
parent359d5aa30ca8349fd38e6968350e7ab4280c1cbb (diff)
downloadbinaryen-d8dc55ceafff2c3b92d7d3e6434d56d346f8913b.tar.gz
binaryen-d8dc55ceafff2c3b92d7d3e6434d56d346f8913b.tar.bz2
binaryen-d8dc55ceafff2c3b92d7d3e6434d56d346f8913b.zip
[Parser] Match legacy parser block naming (#6504)
To reduce the size of the test output diff when switching to the new text parser, update it to generate the same block names as the legacy parser.
Diffstat (limited to 'src/wasm-ir-builder.h')
-rw-r--r--src/wasm-ir-builder.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wasm-ir-builder.h b/src/wasm-ir-builder.h
index 3b6588e86..5803f0c61 100644
--- a/src/wasm-ir-builder.h
+++ b/src/wasm-ir-builder.h
@@ -461,9 +461,13 @@ private:
std::unordered_map<Name, std::vector<Index>> labelDepths;
Name makeFresh(Name label) {
- return Names::getValidName(label, [&](Name candidate) {
- return labelDepths.insert({candidate, {}}).second;
- });
+ return Names::getValidName(
+ label,
+ [&](Name candidate) {
+ return labelDepths.insert({candidate, {}}).second;
+ },
+ 0,
+ "");
}
void pushScope(ScopeCtx scope) {