From 6858dacce33dd47d7509ac159f23c6bf9fc91433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= Date: Fri, 20 Sep 2024 10:57:36 +0200 Subject: [PATCH] Format --- src/parser/contexts.h | 14 +++++++------- src/passes/Print.cpp | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) 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';