@@ -25,23 +25,6 @@ using namespace cir;
2525// ===----------------------------------------------------------------------===//
2626// CIR Dialect
2727// ===----------------------------------------------------------------------===//
28- namespace {
29- struct CIROpAsmDialectInterface : public OpAsmDialectInterface {
30- using OpAsmDialectInterface::OpAsmDialectInterface;
31-
32- AliasResult getAlias (Type type, raw_ostream &os) const final {
33- return AliasResult::NoAlias;
34- }
35-
36- AliasResult getAlias (Attribute attr, raw_ostream &os) const final {
37- if (auto boolAttr = mlir::dyn_cast<cir::BoolAttr>(attr)) {
38- os << (boolAttr.getValue () ? " true" : " false" );
39- return AliasResult::FinalAlias;
40- }
41- return AliasResult::NoAlias;
42- }
43- };
44- } // namespace
4528
4629void cir::CIRDialect::initialize () {
4730 registerTypes ();
@@ -50,7 +33,6 @@ void cir::CIRDialect::initialize() {
5033#define GET_OP_LIST
5134#include " clang/CIR/Dialect/IR/CIROps.cpp.inc"
5235 >();
53- addInterfaces<CIROpAsmDialectInterface>();
5436}
5537
5638// ===----------------------------------------------------------------------===//
@@ -130,13 +112,6 @@ static LogicalResult checkConstantTypes(mlir::Operation *op, mlir::Type opType,
130112 return success ();
131113 }
132114
133- if (mlir::isa<cir::BoolAttr>(attrType)) {
134- if (!mlir::isa<cir::BoolType>(opType))
135- return op->emitOpError (" result type (" )
136- << opType << " ) must be '!cir.bool' for '" << attrType << " '" ;
137- return success ();
138- }
139-
140115 if (mlir::isa<cir::IntAttr, cir::FPAttr>(attrType)) {
141116 auto at = cast<TypedAttr>(attrType);
142117 if (at.getType () != opType) {
0 commit comments