diff --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/include/mlir/IR/OperationSupport.h --- a/mlir/include/mlir/IR/OperationSupport.h +++ b/mlir/include/mlir/IR/OperationSupport.h @@ -272,6 +272,7 @@ /// Add an attribute with the specified name. void append(Identifier name, Attribute attr) { + assert(attr && "unexpected null attribute"); append(NamedAttribute(name, attr)); }