summaryrefslogtreecommitdiff
path: root/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
diff options
context:
space:
mode:
authorGoran Flegar <gflegar@google.com>2022-08-22 17:59:51 +0200
committerGoran Flegar <gflegar@google.com>2022-08-22 17:59:51 +0200
commit59548fe873d8d98e359fb21fbb2a0852fed17ff5 (patch)
treea8e8b3ada5c49e3a6934cb3fa7198f2a235b15c9 /mlir/lib/Bytecode/Reader/BytecodeReader.cpp
parent41d4067d0b7c3c955b8b6cda328bcb46e268bd6a (diff)
[mlir] Fix compile errors with bytecode support
Diffstat (limited to 'mlir/lib/Bytecode/Reader/BytecodeReader.cpp')
-rw-r--r--mlir/lib/Bytecode/Reader/BytecodeReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
index c23640d1cfa0..cbb971910b69 100644
--- a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
+++ b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
@@ -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: