[all-commits] [llvm/llvm-project] ef764e: [mlir:ElementsAttr] Avoid crash on empty contiguou...

River Riddle via All-commits all-commits at lists.llvm.org
Fri Sep 24 16:57:17 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef764eeeb99a62f29d0a20c424328e7be2f5bfb8
      https://github.com/llvm/llvm-project/commit/ef764eeeb99a62f29d0a20c424328e7be2f5bfb8
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    M mlir/include/mlir/IR/BuiltinAttributeInterfaces.td
    M mlir/test/IR/elements-attr-interface.mlir

  Log Message:
  -----------
  [mlir:ElementsAttr] Avoid crash on empty contiguous ranges

We currently, incorrectly, assume that a range always has at least
one element when building a contiguous range. This commit adds
a proper empty check to avoid crashing.

Differential Revision: https://reviews.llvm.org/D110457




More information about the All-commits mailing list