summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2024-08-05 09:21:40 -0700
committerGitHub <noreply@github.com>2024-08-05 09:21:40 -0700
commit53d54d7e4fca4bb971676c2e93440c8f25ec6a6a (patch)
tree349e69e156464092df41a64dd00412a6fc86b552
parent8d2c9ffc6d2cc89d53403986fb330a3953ddf3b8 (diff)
downloadbinaryen-53d54d7e4fca4bb971676c2e93440c8f25ec6a6a.tar.gz
binaryen-53d54d7e4fca4bb971676c2e93440c8f25ec6a6a.tar.bz2
binaryen-53d54d7e4fca4bb971676c2e93440c8f25ec6a6a.zip
[LegalizeJSInterface] Use explicit names for stub functions (#6806)
-rw-r--r--src/passes/LegalizeJSInterface.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp
index bfc7e192b..01a8c2401 100644
--- a/src/passes/LegalizeJSInterface.cpp
+++ b/src/passes/LegalizeJSInterface.cpp
@@ -275,9 +275,11 @@ private:
legalIm->name = Name(std::string("legalimport$") + im->name.toString());
legalIm->module = im->module;
legalIm->base = im->base;
+ legalIm->hasExplicitName = true;
auto stub = std::make_unique<Function>();
stub->name = Name(std::string("legalfunc$") + im->name.toString());
stub->type = im->type;
+ stub->hasExplicitName = true;
auto* call = module->allocator.alloc<Call>();
call->target = legalIm->name;