diff --git a/mlir/include/mlir/IR/BuiltinOps.td b/mlir/include/mlir/IR/BuiltinOps.td --- a/mlir/include/mlir/IR/BuiltinOps.td +++ b/mlir/include/mlir/IR/BuiltinOps.td @@ -85,7 +85,7 @@ static FuncOp create(Location location, StringRef name, FunctionType type, ArrayRef attrs = {}); static FuncOp create(Location location, StringRef name, FunctionType type, - iterator_range attrs); + Operation::dialect_attr_range attrs); static FuncOp create(Location location, StringRef name, FunctionType type, ArrayRef attrs, ArrayRef argAttrs); diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -121,21 +121,10 @@ /// The source location the operation was defined or derived from. Location getLoc() { return state->getLoc(); } - void setLoc(Location loc) { state->setLoc(loc); } /// Return all of the attributes on this operation. ArrayRef getAttrs() { return state->getAttrs(); } - /// A utility iterator that filters out non-dialect attributes. - using dialect_attr_iterator = Operation::dialect_attr_iterator; - using dialect_attr_range = Operation::dialect_attr_range; - - /// Set the dialect attributes for this operation, and preserve all dependent. - template - void setDialectAttrs(DialectAttrs &&attrs) { - state->setDialectAttrs(std::forward(attrs)); - } - /// Remove the attribute with the specified name if it exists. Return the /// attribute that was erased, or nullptr if there was no attribute with such /// name. diff --git a/mlir/lib/IR/BuiltinDialect.cpp b/mlir/lib/IR/BuiltinDialect.cpp --- a/mlir/lib/IR/BuiltinDialect.cpp +++ b/mlir/lib/IR/BuiltinDialect.cpp @@ -90,7 +90,7 @@ return cast(Operation::create(state)); } FuncOp FuncOp::create(Location location, StringRef name, FunctionType type, - iterator_range attrs) { + Operation::dialect_attr_range attrs) { SmallVector attrRef(attrs); return create(location, name, type, llvm::makeArrayRef(attrRef)); }