From 55d035ca36d2a9efb9706c166fb9e1f82e8b5081 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 12 Apr 2024 09:14:25 -0700 Subject: [PATCH] When creating `dynCall` and `legalstub` function mark them as hasExplicitName. NFC This is temporary workaround for the current test failures on the emscripten waterfall. The real fix I believe will be to make `hasExplicitName` the default in these kinds of cases. See: #6466 --- src/passes/GenerateDynCalls.cpp | 1 + src/passes/LegalizeJSInterface.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/passes/GenerateDynCalls.cpp b/src/passes/GenerateDynCalls.cpp index c2d829530db..818bfa967ea 100644 --- a/src/passes/GenerateDynCalls.cpp +++ b/src/passes/GenerateDynCalls.cpp @@ -149,6 +149,7 @@ void GenerateDynCalls::generateDynCallThunk(HeapType funcType) { } auto f = builder.makeFunction( name, std::move(namedParams), Signature(Type(params), sig.results), {}); + f->hasExplicitName = true; Expression* fptr = builder.makeLocalGet(0, Type::i32); std::vector args; Index i = 0; diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp index 24d76ab09c4..a0b526a811e 100644 --- a/src/passes/LegalizeJSInterface.cpp +++ b/src/passes/LegalizeJSInterface.cpp @@ -229,6 +229,7 @@ struct LegalizeJSInterface : public Pass { Builder builder(*module); auto* legal = new Function(); legal->name = legalName; + legal->hasExplicitName = true; auto* call = module->allocator.alloc(); call->target = func->name;