diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/ObjectYAML/WasmYAML.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ObjectYAML/WasmYAML.cpp b/llvm/lib/ObjectYAML/WasmYAML.cpp index 214aa1c7808..88491d955c4 100644 --- a/llvm/lib/ObjectYAML/WasmYAML.cpp +++ b/llvm/lib/ObjectYAML/WasmYAML.cpp @@ -484,7 +484,8 @@ void MappingTraits<WasmYAML::SymbolInfo>::mapping(IO &IO, WasmYAML::SymbolInfo &Info) { IO.mapRequired("Index", Info.Index); IO.mapRequired("Kind", Info.Kind); - IO.mapRequired("Name", Info.Name); + if (Info.Kind != wasm::WASM_SYMBOL_TYPE_SECTION) + IO.mapRequired("Name", Info.Name); IO.mapRequired("Flags", Info.Flags); if (Info.Kind == wasm::WASM_SYMBOL_TYPE_FUNCTION) { IO.mapRequired("Function", Info.ElementIndex); |