Index: include/llvm/BinaryFormat/Wasm.h =================================================================== --- include/llvm/BinaryFormat/Wasm.h +++ include/llvm/BinaryFormat/Wasm.h @@ -144,8 +144,9 @@ 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 of global index + // For function or global symbols, the index in function or global index // space. uint32_t ElementIndex; // For a data symbols, the address of the data relative to segment. Index: lib/Object/WasmObjectFile.cpp =================================================================== --- lib/Object/WasmObjectFile.cpp +++ lib/Object/WasmObjectFile.cpp @@ -418,6 +418,7 @@ wasm::WasmImport &Import = *ImportedFunctions[Info.ElementIndex]; FunctionType = &Signatures[Import.SigIndex]; Info.Name = Import.Field; + Info.Module = Import.Module; } break;