summaryrefslogtreecommitdiff
path: root/src/passes/LegalizeJSInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/LegalizeJSInterface.cpp')
-rw-r--r--src/passes/LegalizeJSInterface.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp
index bbef5109d..f5dbbcf62 100644
--- a/src/passes/LegalizeJSInterface.cpp
+++ b/src/passes/LegalizeJSInterface.cpp
@@ -90,7 +90,7 @@ struct LegalizeJSInterface : public Pass {
// are only called from JS.
if (!func->imported() && !isDynCall(ex->name)) {
Builder builder(*module);
- Name newName = std::string("orig$") + ex->name.str;
+ Name newName = std::string("orig$") + ex->name.toString();
newExports.push_back(builder.makeExport(
newName, func->name, ExternalKind::Function));
}
@@ -239,7 +239,7 @@ private:
// JS calls the export, so it must call a legal stub that calls the actual
// wasm function
Name makeLegalStub(Function* func, Module* module) {
- Name legalName(std::string("legalstub$") + func->name.str);
+ Name legalName(std::string("legalstub$") + func->name.toString());
// a method may be exported multiple times
if (module->getFunctionOrNull(legalName)) {
@@ -292,11 +292,11 @@ private:
Name makeLegalStubForCalledImport(Function* im, Module* module) {
Builder builder(*module);
auto legalIm = make_unique<Function>();
- legalIm->name = Name(std::string("legalimport$") + im->name.str);
+ legalIm->name = Name(std::string("legalimport$") + im->name.toString());
legalIm->module = im->module;
legalIm->base = im->base;
auto stub = make_unique<Function>();
- stub->name = Name(std::string("legalfunc$") + im->name.str);
+ stub->name = Name(std::string("legalfunc$") + im->name.toString());
stub->type = im->type;
auto* call = module->allocator.alloc<Call>();