[Mlir-commits] [mlir] [MLIR][Bytecode] Enforce alignment requirements (PR #157004)

Mehdi Amini llvmlistbot at llvm.org
Sat Sep 6 02:30:51 PDT 2025


================
@@ -2121,6 +2180,11 @@ BytecodeReader::Impl::parseIRSection(ArrayRef<uint8_t> sectionData,
 LogicalResult
 BytecodeReader::Impl::parseRegions(std::vector<RegionReadState> &regionStack,
                                    RegionReadState &readState) {
+  const auto checkSectionAlignment = [&](unsigned alignment) {
+    return this->checkSectionAlignment(
+        alignment, [&](const auto &msg) { return emitError(fileLoc, msg); });
----------------
joker-eph wrote:

One of my comment got lost somehow, I was wondering about why are the three `checkSectionAlignment` lambda using a different error reporting idiom?

https://github.com/llvm/llvm-project/pull/157004


More information about the Mlir-commits mailing list