diff options
Diffstat (limited to 'src/binary-writer.cc')
-rw-r--r-- | src/binary-writer.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/binary-writer.cc b/src/binary-writer.cc index 7136c60c..a64522bc 100644 --- a/src/binary-writer.cc +++ b/src/binary-writer.cc @@ -977,6 +977,13 @@ Result BinaryWriter::WriteModule() { } } + if (!module_->name.empty()) { + WriteU32Leb128(stream_, 0, "module name type"); + BeginSubsection("module name subsection"); + WriteDebugName(stream_, module_->name, "module name"); + EndSubsection(); + } + if (named_functions > 0) { WriteU32Leb128(stream_, 1, "function name type"); BeginSubsection("function name subsection"); |