diff --git a/llvm/include/llvm/BinaryFormat/Wasm.h b/llvm/include/llvm/BinaryFormat/Wasm.h index 700bcd8ca418..dc28a3ccbfbe 100644 --- a/llvm/include/llvm/BinaryFormat/Wasm.h +++ b/llvm/include/llvm/BinaryFormat/Wasm.h @@ -145,6 +145,7 @@ struct WasmSymbolInfo { StringRef Name; uint8_t Kind; uint32_t Flags; + StringRef Module; // For undefined symbols the module name of the import union { // For function or global symbols, the index in function or global index // space. diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp index 6eb0d05dfadd..3e8f73dbd810 100644 --- a/llvm/lib/Object/WasmObjectFile.cpp +++ b/llvm/lib/Object/WasmObjectFile.cpp @@ -412,6 +412,7 @@ Error WasmObjectFile::parseLinkingSectionSymtab(const uint8_t *&Ptr, wasm::WasmImport &Import = *ImportedFunctions[Info.ElementIndex]; FunctionType = &Signatures[Import.SigIndex]; Info.Name = Import.Field; + Info.Module = Import.Module; } break;