Skip to content

Commit

Permalink
Fix parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
osa1 committed Sep 20, 2024
1 parent 6858dac commit 4111ce8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/parser/contexts.h
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ struct ParseDefsCtx : TypeParserCtx<ParseDefsCtx> {
return;
}

std::optional<BinaryLocation> nameIndex;
std::optional<BinaryLocation> symbolNameIndex;
auto namePos = contents.find(':');
if (namePos != contents.npos) {
auto name = contents.substr(namePos + 1);
Expand All @@ -1794,6 +1794,7 @@ struct ParseDefsCtx : TypeParserCtx<ParseDefsCtx> {
assert(wasm.debugInfoSymbolNames.size() == it->second);
wasm.debugInfoSymbolNames.push_back(std::string(file));
}
*symbolNameIndex = it->second;
}

// TODO: If we ever parallelize the parse, access to
Expand All @@ -1805,7 +1806,7 @@ struct ParseDefsCtx : TypeParserCtx<ParseDefsCtx> {
wasm.debugInfoFileNames.push_back(std::string(file));
}
irBuilder.setDebugLocation(
Function::DebugLocation({it->second, *line, *col, std::nullopt}));
Function::DebugLocation({it->second, *line, *col, symbolNameIndex}));
}

Result<> makeBlock(Index pos,
Expand Down

0 comments on commit 4111ce8

Please sign in to comment.