summaryrefslogtreecommitdiff
path: root/mlir/test/lib/IR/TestFunc.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riddleriver@gmail.com>2020-04-07 13:56:16 -0700
committerRiver Riddle <riddleriver@gmail.com>2020-04-07 14:08:52 -0700
commit80aca1eaf778a58458833591e82b74647b5b7280 (patch)
treef38add6f74980acce56446dd2db7d238f3d0efa4 /mlir/test/lib/IR/TestFunc.cpp
parent722f909f7aa1d5ab21f68eb8ce1baf109cc5bb13 (diff)
[mlir][Pass] Remove the use of CRTP from the Pass classes
This revision removes all of the CRTP from the pass hierarchy in preparation for using the tablegen backend instead. This creates a much cleaner interface in the C++ code, and naturally fits with the rest of the infrastructure. A new utility class, PassWrapper, is added to replicate the existing behavior for passes not suitable for using the tablegen backend. Differential Revision: https://reviews.llvm.org/D77350
Diffstat (limited to 'mlir/test/lib/IR/TestFunc.cpp')
-rw-r--r--mlir/test/lib/IR/TestFunc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/mlir/test/lib/IR/TestFunc.cpp b/mlir/test/lib/IR/TestFunc.cpp
index c1b90397ec44..637864e049fd 100644
--- a/mlir/test/lib/IR/TestFunc.cpp
+++ b/mlir/test/lib/IR/TestFunc.cpp
@@ -13,7 +13,8 @@ using namespace mlir;
namespace {
/// This is a test pass for verifying FuncOp's eraseArgument method.
-struct TestFuncEraseArg : public OperationPass<TestFuncEraseArg, ModuleOp> {
+struct TestFuncEraseArg
+ : public PassWrapper<TestFuncEraseArg, OperationPass<ModuleOp>> {
void runOnOperation() override {
auto module = getOperation();
@@ -36,7 +37,8 @@ struct TestFuncEraseArg : public OperationPass<TestFuncEraseArg, ModuleOp> {
};
/// This is a test pass for verifying FuncOp's setType method.
-struct TestFuncSetType : public OperationPass<TestFuncSetType, ModuleOp> {
+struct TestFuncSetType
+ : public PassWrapper<TestFuncSetType, OperationPass<ModuleOp>> {
void runOnOperation() override {
auto module = getOperation();
SymbolTable symbolTable(module);