Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c38acae3 authored by aymaen's avatar aymaen
Browse files

Operation add, execution problem solved.

parent 16075430
Branches
No related tags found
No related merge requests found
......@@ -13,7 +13,8 @@ namespace mlir::adt{
#define GET_OP_CLASSES
#include "../../build/include/Adt/AdtOpsDialect.h.inc"
#include "Adt/AdtOps.h.inc"
#include "Adt/AdtOpsDialect.h.inc"
/// This class defines the adt source types.
......
......@@ -2,7 +2,11 @@
#define ADT_OPS
include "mlir/IR/OpBase.td"
include "mlir/Interfaces/CallInterfaces.td"
include "mlir/Interfaces/CastInterfaces.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
include "mlir/IR/BuiltinAttributes.td"
include "mlir/IR/BuiltinAttributeInterfaces.td"
//===----------------------------------------------------------------------------------------===//
// Adt dialect definition.
//==-----------------------------------------------------------------------------------------===//
......@@ -32,5 +36,16 @@ def Adt_TypeSource :
// Provide a definition of the types that are used within the Toy dialect.
def Toy_Type : AnyTypeOf<[Adt_TypeSource]>;
// Providing a definition of the operation used with our dialect.
//===----------------------------------------------------------------------===//
// TypeConstantOp
//===----------------------------------------------------------------------===//
def TypeConstantOp : Adt_Op<"type_constant",[Pure]>{
let summary = "type constant";
let description = [{
Turning a type declaration into an instance.
}];
let arguments = (ins Builtin_StringAttr:$value);
let results = (outs Adt_TypeSource:$output);
}
#endif // ADT_OPS
\ No newline at end of file
......@@ -80,12 +80,12 @@ class SumType : public TypeSource{
};
#define GET_OP_CLASSES
#include "../build/include/Adt/AdtOpsDialect.cpp.inc"
#include "Adt/AdtOps.cpp.inc"
void AdtDialect::initialize() {
addOperations<
#define GET_OP_LIST
#include "../build/include/Adt/AdtOps.cpp.inc"
#include "Adt/AdtOps.cpp.inc"
>();
addTypes<TypeSource>();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment