blob: 2a10a157dfc90440c7b92e66e8d613f80f6fb5bb [file] [log] [blame]
//===- AttrOrTypeFormatGen.h - MLIR attribute and type format generator ---===//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include "llvm/Support/raw_ostream.h"
#include <string>
namespace mlir {
namespace tblgen {
class AttrOrTypeDef;
/// Generate a parser and printer based on a custom assembly format for an
/// attribute or type.
void generateAttrOrTypeFormat(const AttrOrTypeDef &def, llvm::raw_ostream &os);
/// From the parameter name, get the name of the accessor function in camelcase.
/// The first letter of the parameter is upper-cased and prefixed with "get".
/// E.g. 'value' -> 'getValue'.
std::string getParameterAccessorName(llvm::StringRef name);
} // end namespace tblgen
} // end namespace mlir