15#include "mlir/Support/LogicalResult.h"
17#include "clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"
26void cir::CIRDialect::initialize() {
31#include "clang/CIR/Dialect/IR/CIROps.cpp.inc"
41mlir::LogicalResult cir::GlobalOp::verify() {
return success(); }
43void cir::GlobalOp::build(OpBuilder &odsBuilder, OperationState &odsState,
44 llvm::StringRef sym_name, mlir::Type sym_type) {
45 odsState.addAttribute(getSymNameAttrName(odsState.name),
46 odsBuilder.getStringAttr(sym_name));
47 odsState.addAttribute(getSymTypeAttrName(odsState.name),
48 mlir::TypeAttr::get(sym_type));
55void cir::FuncOp::build(OpBuilder &builder, OperationState &result,
57 result.addAttribute(SymbolTable::getSymbolAttrName(),
58 builder.getStringAttr(name));
61ParseResult cir::FuncOp::parse(OpAsmParser &parser, OperationState &state) {
63 if (parser.parseSymbolName(nameAttr, SymbolTable::getSymbolAttrName(),
69void cir::FuncOp::print(OpAsmPrinter &p) {
72 p.printSymbolName(getSymName());
77mlir::LogicalResult cir::FuncOp::verify() {
return success(); }
84#include "clang/CIR/Dialect/IR/CIROps.cpp.inc"