1//===- StandaloneTypes.td - Standalone dialect types -------*- tablegen -*-===// 2// 3// This file is licensed under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9#ifndef STANDALONE_TYPES 10#define STANDALONE_TYPES 11 12include "mlir/IR/AttrTypeBase.td" 13include "Standalone/StandaloneDialect.td" 14 15//===----------------------------------------------------------------------===// 16// Standalone type definitions 17//===----------------------------------------------------------------------===// 18 19class Standalone_Type<string name, string typeMnemonic, list<Trait> traits = []> 20 : TypeDef<Standalone_Dialect, name, traits> { 21 let mnemonic = typeMnemonic; 22} 23 24def Standalone_CustomType : Standalone_Type<"Custom", "custom"> { 25 let summary = "Standalone custom type"; 26 let description = "Custom type in standalone dialect"; 27 let parameters = (ins StringRefParameter<"the custom value">:$value); 28 let assemblyFormat = "`<` $value `>`"; 29} 30 31#endif // STANDALONE_TYPES 32