[Mlir-commits] [mlir] [mlir] Fix CallOpInterface extraClassDeclaration (PR #81258)

Richard Dzenis llvmlistbot at llvm.org
Fri Feb 9 07:52:37 PST 2024


https://github.com/RIscRIpt created https://github.com/llvm/llvm-project/pull/81258

`extraClassDeclaration` of `CallOpInterface` can be inherited by other `OpInterfaces` into foreign namespaces, thus types must be fully qualified to prevent compiler errors, for example:

    def MyCaller : OpInterface<"MyCaller", [CallOpInterface]> {
        let cppNamespace = "::MyNamespace";
    }

>From 069acd2aa4194294f0b7f8ddbbc01636b72857bb Mon Sep 17 00:00:00 2001
From: Richard Dzenis <dzenis at richard.lv>
Date: Fri, 9 Feb 2024 17:46:46 +0200
Subject: [PATCH] [mlir] Fix CallOpInterface extraClassDeclaration

extraClassDeclaration of CallOpInterface can be inherited by other
OpInterfaces into foreign namespaces, thus types must be fully qualified
to prevent compiler errors, for example:

    def MyCaller : OpInterface<"MyCaller", [CallOpInterface]> {
        let cppNamespace = "::MyNamespace";
    }
---
 mlir/include/mlir/Interfaces/CallInterfaces.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/include/mlir/Interfaces/CallInterfaces.td b/mlir/include/mlir/Interfaces/CallInterfaces.td
index 3e9c002b22ed69..752de74e6e4d7e 100644
--- a/mlir/include/mlir/Interfaces/CallInterfaces.td
+++ b/mlir/include/mlir/Interfaces/CallInterfaces.td
@@ -68,7 +68,7 @@ def CallOpInterface : OpInterface<"CallOpInterface"> {
     /// `symbolTable` is an optional parameter that will allow for using a
     /// cached symbol table for symbol lookups instead of performing an O(N)
     /// scan.
-    Operation *resolveCallable(SymbolTableCollection *symbolTable = nullptr);
+    ::mlir::Operation *resolveCallable(::mlir::SymbolTableCollection *symbolTable = nullptr);
   }];
 }
 



More information about the Mlir-commits mailing list