Skipping the deprecation dance here.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D97494
static FuncOp create(Location location, StringRef name, FunctionType type,
ArrayRef<NamedAttribute> attrs = {});
static FuncOp create(Location location, StringRef name, FunctionType type,
- iterator_range<dialect_attr_iterator> attrs);
+ Operation::dialect_attr_range attrs);
static FuncOp create(Location location, StringRef name, FunctionType type,
ArrayRef<NamedAttribute> attrs,
ArrayRef<DictionaryAttr> argAttrs);
/// 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.
LLVM_ATTRIBUTE_DEPRECATED(
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 <typename DialectAttrs>
- void setDialectAttrs(DialectAttrs &&attrs) {
- state->setDialectAttrs(std::forward<DialectAttrs>(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.
return cast<FuncOp>(Operation::create(state));
}
FuncOp FuncOp::create(Location location, StringRef name, FunctionType type,
- iterator_range<dialect_attr_iterator> attrs) {
+ Operation::dialect_attr_range attrs) {
SmallVector<NamedAttribute, 8> attrRef(attrs);
return create(location, name, type, llvm::makeArrayRef(attrRef));
}