[PATCH] D54044: [WebAssembly] Change indices types to unsined int (NFC)
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 2 12:28:24 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346031: [WebAssembly] Change indices types to unsined int (NFC) (authored by aheejin, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D54044
Files:
llvm/trunk/lib/MC/WasmObjectWriter.cpp
Index: llvm/trunk/lib/MC/WasmObjectWriter.cpp
===================================================================
--- llvm/trunk/lib/MC/WasmObjectWriter.cpp
+++ llvm/trunk/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<int32_t>::getHashValue(int32_t(Ret));
+ Value += DenseMapInfo<uint32_t>::getHashValue(uint32_t(Ret));
for (wasm::ValType Param : FuncTy.Params)
- Value += DenseMapInfo<int32_t>::getHashValue(int32_t(Param));
+ Value += DenseMapInfo<uint32_t>::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<const MCSection *, const MCSymbol *> SectionFunctions;
- DenseMap<WasmFunctionType, int32_t, WasmFunctionTypeDenseMapInfo>
+ DenseMap<WasmFunctionType, uint32_t, WasmFunctionTypeDenseMapInfo>
FunctionTypeIndices;
SmallVector<WasmFunctionType, 4> FunctionTypes;
SmallVector<WasmGlobal, 4> Globals;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54044.172416.patch
Type: text/x-patch
Size: 1339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181102/e2a16a54/attachment.bin>
More information about the llvm-commits
mailing list