From: River Riddle Date: Thu, 12 Jan 2023 22:43:32 +0000 (-0800) Subject: [mlir][NFC] Use explicit ArrayRef construction in OptionalArrayRefParameter X-Git-Tag: upstream/17.0.6~21128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20d06c833d833ef6b2d0f519cc4a7998d49a2803;p=platform%2Fupstream%2Fllvm.git [mlir][NFC] Use explicit ArrayRef construction in OptionalArrayRefParameter GCC was barfing on template deduction for ArrayRef parameters in some situations. --- diff --git a/mlir/include/mlir/IR/AttrTypeBase.td b/mlir/include/mlir/IR/AttrTypeBase.td index dd17f08..e9c25ee 100644 --- a/mlir/include/mlir/IR/AttrTypeBase.td +++ b/mlir/include/mlir/IR/AttrTypeBase.td @@ -368,7 +368,7 @@ class OptionalArrayRefParameter : 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.