================
@@ -509,6 +509,25 @@ def CIR_FuncType : CIR_Type<"Func", "func"> {
/// Returns a clone of this function type with the given argument
/// and result types.
FuncType clone(mlir::TypeRange inputs, mlir::TypeRange results) const;
+
+ /// A list of mlir attributes that shouldn't appear in the generic
+ /// 'attributes' list, and instead are handled via other syntax.
+ static constexpr llvm::StringRef disallowedFromAttrList[] = {
----------------
andykaylor wrote:
I see that the other in-tree callers of `printFunctionAttributes` are using
`get<>AttrName` to construct a list like this at the call site. In some cases
these appear to be wrapper functions in the .td files that get a raw string,
but in other cases I think they're generated from the op definition. I see that
the generated code for `cir::FuncOp` has such functions. It also has this,
which is suspiciously close to your list:
```
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
static ::llvm::StringRef attrNames[] = {
::llvm::StringRef("aliasee"),
::llvm::StringRef("arg_attrs"),
::llvm::StringRef("builtin"),
::llvm::StringRef("comdat"),
::llvm::StringRef("coroutine"),
::llvm::StringRef("cxx_special_member"),
::llvm::StringRef("dso_local"),
::llvm::StringRef("function_type"),
::llvm::StringRef("global_ctor_priority"),
::llvm::StringRef("global_dtor_priority"),
::llvm::StringRef("global_visibility"),
::llvm::StringRef("inline_kind"),
::llvm::StringRef("lambda"),
::llvm::StringRef("linkage"),
::llvm::StringRef("no_proto"),
::llvm::StringRef("res_attrs"),
::llvm::StringRef("sym_name"),
::llvm::StringRef("sym_visibility")
};
return ::llvm::ArrayRef(attrNames);
}
```
https://github.com/llvm/llvm-project/pull/169674
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits