aboutsummaryrefslogtreecommitdiff
path: root/wasm/SymbolTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wasm/SymbolTable.cpp')
-rw-r--r--wasm/SymbolTable.cpp10
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.