Summary:
The old return type did not allow for correct error reporting and was
causing a compiler warning.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54586
llvm-svn: 346979
createWebAssemblyDisassembler);
}
-static uint8_t nextByte(ArrayRef<uint8_t> Bytes, uint64_t &Size) {
+static int nextByte(ArrayRef<uint8_t> Bytes, uint64_t &Size) {
if (Size >= Bytes.size())
return -1;
auto V = Bytes[Size];
raw_ostream & /*OS*/, raw_ostream &CS) const {
CommentStream = &CS;
Size = 0;
- auto Opc = nextByte(Bytes, Size);
+ int Opc = nextByte(Bytes, Size);
if (Opc < 0)
return MCDisassembler::Fail;
const auto *WasmInst = &InstructionTable0[Opc];