Skip to content

Commit

Permalink
Fix wat parsing a little bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
osa1 committed Sep 25, 2024
1 parent 56abcb5 commit 7013707
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser/contexts.h
Original file line number Diff line number Diff line change
Expand Up @@ -1797,12 +1797,12 @@ struct ParseDefsCtx : TypeParserCtx<ParseDefsCtx> {

std::optional<BinaryLocation> symbolNameIndex;
if (!contents.empty()) {
auto name = contents;
auto symbolName = contents;
auto [it, inserted] =
debugSymbolNameIndices.insert({name, debugSymbolNameIndices.size()});
debugSymbolNameIndices.insert({symbolName, debugSymbolNameIndices.size()});
if (inserted) {
assert(wasm.debugInfoSymbolNames.size() == it->second);
wasm.debugInfoSymbolNames.push_back(std::string(file));
wasm.debugInfoSymbolNames.push_back(std::string(symbolName));
}
*symbolNameIndex = it->second;
}
Expand Down

0 comments on commit 7013707

Please sign in to comment.