Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
osa1 committed Sep 20, 2024
1 parent 0a9d251 commit 6858dac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/parser/contexts.h
Original file line number Diff line number Diff line change
Expand Up @@ -1787,13 +1787,13 @@ struct ParseDefsCtx : TypeParserCtx<ParseDefsCtx> {
std::optional<BinaryLocation> 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
Expand Down
5 changes: 3 additions & 2 deletions src/passes/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 6858dac

Please sign in to comment.