Index: lib/MC/WasmObjectWriter.cpp =================================================================== --- lib/MC/WasmObjectWriter.cpp +++ lib/MC/WasmObjectWriter.cpp @@ -92,9 +92,9 @@ static unsigned getHashValue(const WasmFunctionType &FuncTy) { uintptr_t Value = FuncTy.State; for (wasm::ValType Ret : FuncTy.Returns) - Value += DenseMapInfo::getHashValue(int32_t(Ret)); + Value += DenseMapInfo::getHashValue(uint32_t(Ret)); for (wasm::ValType Param : FuncTy.Params) - Value += DenseMapInfo::getHashValue(int32_t(Param)); + Value += DenseMapInfo::getHashValue(uint32_t(Param)); return Value; } static bool isEqual(const WasmFunctionType &LHS, @@ -118,7 +118,7 @@ // A wasm function to be written into the function section. struct WasmFunction { - int32_t Type; + uint32_t Type; const MCSymbolWasm *Sym; }; @@ -231,7 +231,7 @@ // Map from section to defining function symbol. DenseMap SectionFunctions; - DenseMap + DenseMap FunctionTypeIndices; SmallVector FunctionTypes; SmallVector Globals;