diff options
Diffstat (limited to 'src/passes/StringLowering.cpp')
-rw-r--r-- | src/passes/StringLowering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/passes/StringLowering.cpp b/src/passes/StringLowering.cpp index dd7428546..5b5a5b551 100644 --- a/src/passes/StringLowering.cpp +++ b/src/passes/StringLowering.cpp @@ -126,7 +126,8 @@ struct StringGathering : public Pass { // Find globals to reuse (see comment on stringPtrsToPreserve for context). for (auto& global : module->globals) { - if (global->type == nnstringref && !global->imported()) { + if (global->type == nnstringref && !global->imported() && + !global->mutable_) { if (auto* stringConst = global->init->dynCast<StringConst>()) { auto& globalName = stringToGlobalName[stringConst->string]; if (!globalName.is()) { |