File tree Expand file tree Collapse file tree 2 files changed +1
-26
lines changed
include/clang/CIR/Dialect/IR Expand file tree Collapse file tree 2 files changed +1
-26
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ def CIR_Dialect : Dialect {
2424
2525 let cppNamespace = "::cir";
2626
27- let useDefaultAttributePrinterParser = 0;
28- let useDefaultTypePrinterParser = 0;
27+ let useDefaultAttributePrinterParser = 1;
2928
3029 // Enable constant materialization for the CIR dialect. This generates a
3130 // declaration for the cir::CIRDialect::materializeConstant function. This
@@ -52,12 +51,6 @@ def CIR_Dialect : Dialect {
5251 mlir::Type parseType(mlir::DialectAsmParser &parser) const override;
5352 void printType(mlir::Type type,
5453 mlir::DialectAsmPrinter &printer) const override;
55-
56- mlir::Attribute parseAttribute(mlir::DialectAsmParser &parser,
57- mlir::Type type) const override;
58-
59- void printAttribute(mlir::Attribute attr,
60- mlir::DialectAsmPrinter &os) const override;
6154 }];
6255}
6356
Original file line number Diff line number Diff line change @@ -68,24 +68,6 @@ using namespace cir;
6868// General CIR parsing / printing
6969// ===----------------------------------------------------------------------===//
7070
71- Attribute CIRDialect::parseAttribute (DialectAsmParser &parser,
72- Type type) const {
73- llvm::SMLoc typeLoc = parser.getCurrentLocation ();
74- llvm::StringRef mnemonic;
75- Attribute genAttr;
76- OptionalParseResult parseResult =
77- generatedAttributeParser (parser, &mnemonic, type, genAttr);
78- if (parseResult.has_value ())
79- return genAttr;
80- parser.emitError (typeLoc, " unknown attribute in CIR dialect" );
81- return Attribute ();
82- }
83-
84- void CIRDialect::printAttribute (Attribute attr, DialectAsmPrinter &os) const {
85- if (failed (generatedAttributePrinter (attr, os)))
86- llvm_unreachable (" unexpected CIR type kind" );
87- }
88-
8971static void printRecordMembers (mlir::AsmPrinter &printer,
9072 mlir::ArrayAttr members) {
9173 printer << ' {' ;
You can’t perform that action at this time.
0 commit comments