llvm/mlir/test/lib/IR/TestMatchers.cpp

//===- TestMatchers.cpp - Pass to test matchers ---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Matchers.h"
#include "mlir/Interfaces/FunctionInterfaces.h"
#include "mlir/Pass/Pass.h"

usingnamespacemlir;

namespace {
/// This is a test pass for verifying matchers.
struct TestMatchers
    : public PassWrapper<TestMatchers, InterfacePass<FunctionOpInterface>> {};
} // namespace

// This could be done better but is not worth the variadic template trouble.
template <typename Matcher>
static unsigned countMatches(FunctionOpInterface f, Matcher &matcher) {}

m_Any;
m_Val;
static void test1(FunctionOpInterface f) {}

void test2(FunctionOpInterface f) {}

void test3(FunctionOpInterface f) {}

void TestMatchers::runOnOperation() {}

namespace mlir {
void registerTestMatchers() {}
} // namespace mlir