Skip to content
Commit 60d719b4 authored by Chia-hung Duan's avatar Chia-hung Duan
Browse files

[mlir] Check nullity of MixedContainerType and TypedArrayAttrBase

    It's valid to create a TypedArrayAttr or MixedContainerType with
    nullptr, e.g.,
      std::vector<mlir::Attribute> attrs = {mlir::StringAttr()};
      builder.createArrayAttr(attrs);

    The predicate didn't check if it's a nullptr and it ended up a crash in
    the attribute static verifier. We always check if an attribute is null
    so it's better to align the check for these two container type attr.

Reviewed By: rdzhabarov

Differential Revision: https://reviews.llvm.org/D121178
parent e4ab2024
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment