1 //===- OpGenHelpers.h - MLIR operation generator helpers --------*- 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 defines helpers used in the op generators.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_TOOLS_MLIRTBLGEN_OPGENHELPERS_H_
14 #define MLIR_TOOLS_MLIRTBLGEN_OPGENHELPERS_H_
15 
16 #include "llvm/TableGen/Record.h"
17 #include <vector>
18 
19 namespace mlir {
20 namespace tblgen {
21 
22 /// Returns all the op definitions filtered by the user. The filtering is via
23 /// command-line option "op-include-regex" and "op-exclude-regex".
24 std::vector<llvm::Record *>
25 getRequestedOpDefinitions(const llvm::RecordKeeper &recordKeeper);
26 
27 } // namespace tblgen
28 } // namespace mlir
29 
30 #endif //  MLIR_TOOLS_MLIRTBLGEN_OPGENHELPERS_H_
31