diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/ObjectYAML/WasmYAML.cpp | 3 | ||||
| -rw-r--r-- | llvm/tools/yaml2obj/yaml2wasm.cpp | 5 |
2 files changed, 2 insertions, 6 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); diff --git a/llvm/tools/yaml2obj/yaml2wasm.cpp b/llvm/tools/yaml2obj/yaml2wasm.cpp index cd07a30b748..758c498bd35 100644 --- a/llvm/tools/yaml2obj/yaml2wasm.cpp +++ b/llvm/tools/yaml2obj/yaml2wasm.cpp @@ -532,11 +532,6 @@ int WasmWriter::writeRelocSection(raw_ostream &OS, WasmYAML::Section &Sec, break; case wasm::WASM_SEC_CUSTOM: { auto CustomSection = dyn_cast<WasmYAML::CustomSection>(&Sec); - if (!CustomSection->Name.startswith(".debug_")) { - llvm_unreachable("not yet implemented (only for debug sections)"); - return 1; - } - writeStringRef(("reloc." + CustomSection->Name).str(), OS); break; } |

