Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/mlir-tblgen/op-decl.td
Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
// CHECK_LABEL: class NS_JOp : | // CHECK_LABEL: class NS_JOp : | ||||
// CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type r, ::mlir::Value a, ::mlir::Value b); | // CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type r, ::mlir::Value a, ::mlir::Value b); | ||||
// CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); | // CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); | ||||
// CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); | // CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); | ||||
// CHECK: static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); | // CHECK: static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); | ||||
// CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); | // CHECK: static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); | ||||
// Test that type defs have the proper namespaces when used as a constraint. | |||||
// --- | |||||
def Test_Dialect2 : Dialect { | |||||
let name = "test"; | |||||
let cppNamespace = "::mlir::dialect2"; | |||||
} | |||||
def TestDialect2Type : TypeDef<Test_Dialect2, "Dialect2Type">; | |||||
def NS_ResultWithDialectTypeOp : NS_Op<"op_with_dialect_type", []> { | |||||
let results = (outs TestDialect2Type); | |||||
} | |||||
// CHECK-LABEL: NS::ResultWithDialectTypeOp declarations | |||||
// CHECK: class ResultWithDialectTypeOp : | |||||
// CHECK-SAME: ::mlir::OpTrait::OneTypedResult<::mlir::dialect2::Dialect2TypeType> | |||||
// Check that default builders can be suppressed. | // Check that default builders can be suppressed. | ||||
// --- | // --- | ||||
def NS_SkipDefaultBuildersOp : NS_Op<"skip_default_builders", []> { | def NS_SkipDefaultBuildersOp : NS_Op<"skip_default_builders", []> { | ||||
let skipDefaultBuilders = 1; | let skipDefaultBuilders = 1; | ||||
let builders = [OpBuilderDAG<(ins "Value":$val)>]; | let builders = [OpBuilderDAG<(ins "Value":$val)>]; | ||||
} | } | ||||
Show All 23 Lines |