diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:50 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:50 +0000 |
commit | 0d9ba4fe26725cacc7253fc3c72c4574f26bc099 (patch) | |
tree | 90c426d54188ca226b29aaf8a308bba364a73d1a /wasm/SymbolTable.cpp | |
parent | eb1ff93d02b5f17b6b409e83c6d9be585f4a04b3 (diff) |
Notes
Diffstat (limited to 'wasm/SymbolTable.cpp')
-rw-r--r-- | wasm/SymbolTable.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/wasm/SymbolTable.cpp b/wasm/SymbolTable.cpp index d9a6fa1f04f5..751008da0536 100644 --- a/wasm/SymbolTable.cpp +++ b/wasm/SymbolTable.cpp @@ -83,15 +83,7 @@ static const WasmSignature *getFunctionSig(const ObjFile &Obj, const WasmSymbol &Sym) { DEBUG(dbgs() << "getFunctionSig: " << Sym.Name << "\n"); const WasmObjectFile *WasmObj = Obj.getWasmObj(); - uint32_t FunctionType; - if (Obj.isImportedFunction(Sym.ElementIndex)) { - const WasmImport &Import = WasmObj->imports()[Sym.ImportIndex]; - FunctionType = Import.SigIndex; - } else { - uint32_t FuntionIndex = Sym.ElementIndex - Obj.NumFunctionImports(); - FunctionType = WasmObj->functionTypes()[FuntionIndex]; - } - return &WasmObj->types()[FunctionType]; + return &WasmObj->types()[Sym.FunctionType]; } // Check the type of new symbol matches that of the symbol is replacing. |