================
@@ -351,22 +351,25 @@ class ModuleTranslation {
 
   // A helper callback that takes an attribute, and if it is a StringAttr,
   // properly converts it to the 'no-builtin-VALUE' form.
-  static std::optional<std::string> convertNoBuiltin(mlir::Attribute a) {
-    if (auto str = dyn_cast<StringAttr>(a))
-      return ("no-builtin-" + str.getValue()).str();
-    return std::nullopt;
-  }
+  static std::optional<llvm::Attribute> convertNoBuiltin(llvm::LLVMContext 
&ctx,
+                                                         mlir::Attribute a);
+
+  static std::optional<llvm::Attribute>
+  convertDefaultFuncAttr(llvm::LLVMContext &ctx,
+                         mlir::NamedAttribute namedAttr);
 
   /// A template that takes an ArrayAttr, converts it via a user provided
   /// callback, then adds each element to as function attributes to the 
provided
   /// operation.
-  template <typename Operation, typename Converter>
-  void convertFunctionArrayAttr(ArrayAttr array, Operation *op,
+  template <typename ArrayTy, typename Operation, typename Converter>
+  void convertFunctionArrayAttr(ArrayTy arrayAttr, Operation *op,
----------------
xlauko wrote:

A bit misleading comment and name as it now takes both Dictionary and Array 
attributes. Maybe `convertFunctionAttrs` and `AttrsTy` is more appropriate? 

https://github.com/llvm/llvm-project/pull/179811
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to