[PATCH] D54138: [WebAssembly] Read prefixed opcodes as ULEB128s

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 11:03:15 PST 2018


tlively 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 wrote:
> MTC wrote:
> > @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)
> >            ^
> > ```
> Thanks for the heads up! I'll fix this soon.
This should be fixed in rL346979.


Repository:
  rL LLVM

https://reviews.llvm.org/D54138





More information about the llvm-commits mailing list