summaryrefslogtreecommitdiff
path: root/src/parser/context-decls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/context-decls.cpp')
-rw-r--r--src/parser/context-decls.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/parser/context-decls.cpp b/src/parser/context-decls.cpp
index c5b212038..8e9638ae7 100644
--- a/src/parser/context-decls.cpp
+++ b/src/parser/context-decls.cpp
@@ -196,7 +196,8 @@ ParseDeclsCtx::addGlobalDecl(Index pos, Name name, ImportNames* importNames) {
}
g->setExplicitName(name);
} else {
- name = (importNames ? "gimport$" : "") + std::to_string(globalCounter++);
+ name =
+ (importNames ? "gimport$" : "global$") + std::to_string(globalCounter++);
name = Names::getValidGlobalName(wasm, name);
g->name = name;
}
@@ -276,7 +277,7 @@ ParseDeclsCtx::addTagDecl(Index pos, Name name, ImportNames* importNames) {
}
t->setExplicitName(name);
} else {
- name = (importNames ? "timport$" : "") + std::to_string(tagCounter++);
+ name = (importNames ? "eimport$" : "tag$") + std::to_string(tagCounter++);
name = Names::getValidTagName(wasm, name);
t->name = name;
}