diff options
author | Chia-hung Duan <chiahungduan@google.com> | 2022-03-08 17:48:08 +0000 |
---|---|---|
committer | Chia-hung Duan <chiahungduan@google.com> | 2022-03-08 18:10:55 +0000 |
commit | 60d719b462a136a75610bf1d1c9f4e043d394eea (patch) | |
tree | 30e41147acd38f25794a40653aa74a9c4b3d764b /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | e4ab2024a65a2233d258fc3377bd6c84376376aa (diff) | |
download | llvm-60d719b462a136a75610bf1d1c9f4e043d394eea.zip llvm-60d719b462a136a75610bf1d1c9f4e043d394eea.tar.gz llvm-60d719b462a136a75610bf1d1c9f4e043d394eea.tar.bz2 |
[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
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions