[mlir] Fix compile errors with bytecode support

This commit is contained in:
Goran Flegar 2022-08-22 17:59:51 +02:00
parent 41d4067d0b
commit 59548fe873
2 changed files with 3 additions and 2 deletions

View File

@ -165,14 +165,14 @@ public:
/// contents of the section in `sectionData`.
LogicalResult parseSection(bytecode::Section::ID &sectionID,
ArrayRef<uint8_t> &sectionData) {
size_t length;
uint64_t length;
if (failed(parseByte(sectionID)) || failed(parseVarInt(length)))
return failure();
if (sectionID >= bytecode::Section::kNumSections)
return emitError("invalid section ID: ", unsigned(sectionID));
// Parse the actua section data now that we have its length.
return parseBytes(length, sectionData);
return parseBytes(static_cast<size_t>(length), sectionData);
}
private:

View File

@ -6189,6 +6189,7 @@ cc_library(
hdrs = ["include/mlir/Tools/mlir-opt/MlirOptMain.h"],
includes = ["include"],
deps = [
":BytecodeReader",
":BytecodeWriter",
":IR",
":Parser",