diff options
author | Derek Schuff <dschuff@chromium.org> | 2024-02-02 10:44:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-02 10:44:52 -0800 |
commit | ef1f999e13bd58394bc1099c87a470d91682153d (patch) | |
tree | 510139b4e4e8c42d9f418ac8581a0cf9bcea8172 /llvm/tools | |
parent | d4de4c3eafa9b70c255a4d6d5a14dccff79d10e9 (diff) | |
download | llvm-ef1f999e13bd58394bc1099c87a470d91682153d.zip llvm-ef1f999e13bd58394bc1099c87a470d91682153d.tar.gz llvm-ef1f999e13bd58394bc1099c87a470d91682153d.tar.bz2 |
[Object][Wasm] Move WasmSymbolInfo directly into WasmSymbol (NFC) (#80219)
Move the WasmSymbolInfos from their own vector on the WasmLinkingData
directly into the WasmSymbol object. Removing the const-ref to an
external object allows the vector of WasmSymbols to be safely
expanded/reallocated; generating symbol info from the name section will
require this, as the numbers of function and data segment names are
stored separately.
This is a step toward generating symbol information from name sections
for #76107
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/obj2yaml/wasm2yaml.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/obj2yaml/wasm2yaml.cpp b/llvm/tools/obj2yaml/wasm2yaml.cpp index c15d64c..9aa7f5a 100644 --- a/llvm/tools/obj2yaml/wasm2yaml.cpp +++ b/llvm/tools/obj2yaml/wasm2yaml.cpp @@ -124,7 +124,8 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) { } uint32_t SymbolIndex = 0; - for (const wasm::WasmSymbolInfo &Symbol : Obj.linkingData().SymbolTable) { + for (const object::SymbolRef &Sym : Obj.symbols()) { + const wasm::WasmSymbolInfo &Symbol = Obj.getWasmSymbol(Sym).Info; WasmYAML::SymbolInfo Info; Info.Index = SymbolIndex++; Info.Kind = static_cast<uint32_t>(Symbol.Kind); |