[PATCH] D54138: [WebAssembly] Read prefixed opcodes as ULEB128s
Henry Wong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 12 04:34:30 PST 2018
MTC added inline comments.
================
Comment at: llvm/trunk/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp:69
-static int nextByte(ArrayRef<uint8_t> Bytes, uint64_t &Size) {
+static uint8_t nextByte(ArrayRef<uint8_t> Bytes, uint64_t &Size) {
if (Size >= Bytes.size())
----------------
@tlively Just to remind, change `int` to `uint8_t` will trigger the following warning, see line 123.
```
warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (Opc < 0)
^
```
Repository:
rL LLVM
https://reviews.llvm.org/D54138
More information about the llvm-commits
mailing list