File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -721,6 +721,7 @@ class WasmBinaryWriter {
721721 void writeLateUserSections ();
722722 void writeUserSection (const UserSection& section);
723723
724+ void initializeDebugInfo ();
724725 void writeSourceMapProlog ();
725726 void writeSourceMapEpilog ();
726727 void writeDebugLocation (const Function::DebugLocation& loc);
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ void WasmBinaryWriter::write() {
4444
4545 writeEarlyUserSections ();
4646
47+ initializeDebugInfo ();
4748 if (sourceMap) {
4849 writeSourceMapProlog ();
4950 }
@@ -484,8 +485,11 @@ void WasmBinaryWriter::writeSymbolMap() {
484485 file.close ();
485486}
486487
487- void WasmBinaryWriter::writeSourceMapProlog () {
488+ void WasmBinaryWriter::initializeDebugInfo () {
488489 lastDebugLocation = { 0 , /* lineNumber = */ 1 , 0 };
490+ }
491+
492+ void WasmBinaryWriter::writeSourceMapProlog () {
489493 *sourceMap << " {\" version\" :3,\" sources\" :[" ;
490494 for (size_t i = 0 ; i < wasm->debugInfoFileNames .size (); i++) {
491495 if (i > 0 ) *sourceMap << " ," ;
You can’t perform that action at this time.
0 commit comments