diff --git a/mlir/include/mlir/IR/AttrTypeBase.td b/mlir/include/mlir/IR/AttrTypeBase.td --- a/mlir/include/mlir/IR/AttrTypeBase.td +++ b/mlir/include/mlir/IR/AttrTypeBase.td @@ -342,11 +342,12 @@ } // For StringRefs, which require allocation. -class StringRefParameter : +class StringRefParameter : AttrOrTypeParameter<"::llvm::StringRef", desc> { let allocator = [{$_dst = $_allocator.copyInto($_self);}]; let printer = [{$_printer << '"' << $_self << '"';}]; let cppStorageType = "std::string"; + let defaultValue = value; } // For APFloats, which require comparison.