[Mlir-commits] [mlir] 9db95a6 - Fix interface trait declaration in SymbolInterfaces.td

Alex Zinenko llvmlistbot at llvm.org
Mon Aug 30 02:15:13 PDT 2021


Author: Alex Zinenko
Date: 2021-08-30T11:15:05+02:00
New Revision: 9db95a67d14c918371234e5c98263a977835e19f

URL: https://github.com/llvm/llvm-project/commit/9db95a67d14c918371234e5c98263a977835e19f
DIFF: https://github.com/llvm/llvm-project/commit/9db95a67d14c918371234e5c98263a977835e19f.diff

LOG: Fix interface trait declaration in SymbolInterfaces.td

41d4aa7de68ed551010f27ff04ffc54e7616292a introduced incorrect code in
extraTraitClassDeclaration: `this` refers to the trait class and not the
operation class so `->getContext()` is not valid. Use `$_op` instead.

Added: 
    

Modified: 
    mlir/include/mlir/IR/SymbolInterfaces.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/SymbolInterfaces.td b/mlir/include/mlir/IR/SymbolInterfaces.td
index 97bda0ea73b4..e332bb639de0 100644
--- a/mlir/include/mlir/IR/SymbolInterfaces.td
+++ b/mlir/include/mlir/IR/SymbolInterfaces.td
@@ -205,7 +205,7 @@ def Symbol : OpInterface<"SymbolOpInterface"> {
 
     /// Convenience version of `setName` that take a StringRef.
     void setName(StringRef name) {
-      setName(StringAttr::get(this->getContext(), name));
+      setName(StringAttr::get($_op->getContext(), name));
     }
   }];
 }


        


More information about the Mlir-commits mailing list