diff --git a/src/parser/contexts.h b/src/parser/contexts.h index dc252326750..67bd8a98821 100644 --- a/src/parser/contexts.h +++ b/src/parser/contexts.h @@ -1787,13 +1787,13 @@ struct ParseDefsCtx : TypeParserCtx { std::optional nameIndex; auto namePos = contents.find(':'); if (namePos != contents.npos) { - auto name = contents.substr(namePos + 1); - auto [it, inserted] = - debugSymbolNameIndices.insert({name, debugSymbolNameIndices.size()}); - if (inserted) { - assert(wasm.debugInfoSymbolNames.size() == it->second); - wasm.debugInfoSymbolNames.push_back(std::string(file)); - } + auto name = contents.substr(namePos + 1); + auto [it, inserted] = + debugSymbolNameIndices.insert({name, debugSymbolNameIndices.size()}); + if (inserted) { + assert(wasm.debugInfoSymbolNames.size() == it->second); + wasm.debugInfoSymbolNames.push_back(std::string(file)); + } } // TODO: If we ever parallelize the parse, access to diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 690776d10c8..f50e4033822 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2507,8 +2507,9 @@ void PrintSExpression::printDebugLocation( << location->columnNumber; if (location->nameIndex.has_value()) { - auto symbolName = currModule->debugInfoSymbolNames[*(location->nameIndex)]; - o << ":" << symbolName; + auto symbolName = + currModule->debugInfoSymbolNames[*(location->nameIndex)]; + o << ":" << symbolName; } o << '\n';