[Mlir-commits] [mlir] 20d06c8 - [mlir][NFC] Use explicit ArrayRef construction in OptionalArrayRefParameter

River Riddle llvmlistbot at llvm.org
Thu Jan 12 14:58:28 PST 2023


Author: River Riddle
Date: 2023-01-12T14:58:06-08:00
New Revision: 20d06c833d833ef6b2d0f519cc4a7998d49a2803

URL: https://github.com/llvm/llvm-project/commit/20d06c833d833ef6b2d0f519cc4a7998d49a2803
DIFF: https://github.com/llvm/llvm-project/commit/20d06c833d833ef6b2d0f519cc4a7998d49a2803.diff

LOG: [mlir][NFC] Use explicit ArrayRef construction in OptionalArrayRefParameter

GCC was barfing on template deduction for ArrayRef parameters in
some situations.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/AttrTypeBase.td b/mlir/include/mlir/IR/AttrTypeBase.td
index dd17f0866760..e9c25eef7f47 100644
--- a/mlir/include/mlir/IR/AttrTypeBase.td
+++ b/mlir/include/mlir/IR/AttrTypeBase.td
@@ -368,7 +368,7 @@ class OptionalArrayRefParameter<string arrayOf, string desc = ""> :
     OptionalParameter<"::llvm::ArrayRef<" # arrayOf # ">", desc> {
   let allocator = [{$_dst = $_allocator.copyInto($_self);}];
   let cppStorageType = "::llvm::SmallVector<" # arrayOf # ">";
-  let comparator = "::llvm::ArrayRef($_lhs) == ::llvm::ArrayRef($_rhs)";
+  let comparator = cppType # "($_lhs) == " # cppType # "($_rhs)";
 }
 
 // For classes which require allocation and have their own allocateInto method.


        


More information about the Mlir-commits mailing list