diff options
author | Sam Clegg <sbc@chromium.org> | 2019-05-07 03:53:16 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2019-05-07 03:53:16 +0000 |
commit | 5f8c2edef355e05c2041eba69b482f13a358abf6 (patch) | |
tree | 6674c0ab08df28e79d16e2ff6b1d7fde08ce6c68 /llvm/lib/ObjectYAML/WasmYAML.cpp | |
parent | c72aaf62d3f92c0c6d33b4df2253505f6eb22996 (diff) | |
download | llvm-5f8c2edef355e05c2041eba69b482f13a358abf6.zip llvm-5f8c2edef355e05c2041eba69b482f13a358abf6.tar.gz llvm-5f8c2edef355e05c2041eba69b482f13a358abf6.tar.bz2 |
[WebAssembly] Add more test coverage for reloctions against section symbols
The only known user of this relocation type and symbol type is
the debug info sections, but we were not testing the `--relocatable`
output path.
This change adds a minimal test case to cover relocations against
section symbols includes `--relocatable` output.
Differential Revision: https://reviews.llvm.org/D61623
llvm-svn: 360110
Diffstat (limited to 'llvm/lib/ObjectYAML/WasmYAML.cpp')
-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 214aa1c..88491d9 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); |