File tree 4 files changed +48
-1
lines changed
test/lib/Dialect/TestIRDLToCpp
4 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,17 @@ add_mlir_translation_library(MLIRTargetIRDLToCpp
2
2
TranslationRegistration.cpp
3
3
IRDLToCpp.cpp
4
4
5
+ Templates/DialectDecl.txt
6
+ Templates/DialectDef.txt
7
+ Templates/Header.txt
8
+ Templates/OperationDef.txt
9
+ Templates/PerOperationDecl.txt
10
+ Templates/PerOperationDef.txt
11
+ Templates/TypeDecl.txt
12
+ Templates/TypeDef.txt
13
+ Templates/TypeHeaderDecl.txt
14
+ Templates/TypeHeaderDef.txt
15
+
5
16
LINK_LIBS PUBLIC
6
17
MLIRIR
7
18
MLIRIRDL
Original file line number Diff line number Diff line change 10
10
*/
11
11
12
12
R"(
13
- MLIR_DEFINE_EXPLICIT_TYPE_ID({3}::{2})
14
13
{0}
15
14
{2}::{2}(::mlir::MLIRContext *context)
16
15
: ::mlir::Dialect(getDialectNamespace(), context, ::mlir::TypeID::get<{2}>())
@@ -30,4 +29,5 @@ void {2}::initialize() {{
30
29
>();
31
30
}
32
31
{1}
32
+ MLIR_DEFINE_EXPLICIT_TYPE_ID({3}::{2})
33
33
)"
Original file line number Diff line number Diff line change
1
+ // ===- TestDialect.cpp - MLIR Test Dialect Types ------------------*- C++ -*-===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+ //
9
+ // This file includes TestIRDLToCpp dialect.
10
+ //
11
+ // ===----------------------------------------------------------------------===//
1
12
13
+ #include " mlir/IR/Dialect.h"
14
+ #include " mlir/IR/Region.h"
15
+
16
+ #include " TestIRDLToCppDialect.h"
17
+
18
+ #define GEN_DIALECT_DEF
2
19
#include " test_irdl_to_cpp.irdl.mlir.cpp.inc"
3
20
Original file line number Diff line number Diff line change
1
+ // ===- TestDialect.cpp - MLIR Test Dialect Types ------------------*- C++ -*-===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+ //
9
+ // This file includes TestIRDLToCpp dialect headers.
10
+ //
11
+ // ===----------------------------------------------------------------------===//
12
+
13
+ #ifndef MLIR_TEST_LIB_DIALECT_TESTIRDLTOCPP_TESTIRDLTOCPPDIALECT_H
14
+ #define MLIR_TEST_LIB_DIALECT_TESTIRDLTOCPP_TESTIRDLTOCPPDIALECT_H
15
+
16
+ #define GEN_DIALECT_DECL_HEADER
17
+ #include " test_irdl_to_cpp.irdl.mlir.cpp.inc"
18
+
19
+ #endif // MLIR_TEST_LIB_DIALECT_TESTIRDLTOCPP_TESTIRDLTOCPPDIALECT_H
You can’t perform that action at this time.
0 commit comments