[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / mlir / tools / mlir-tblgen / OpGenHelpers.h
blob3dcff14d1221ee36c08eb2f44924bcffcc5a1d71
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.
11 //===----------------------------------------------------------------------===//
13 #ifndef MLIR_TOOLS_MLIRTBLGEN_OPGENHELPERS_H_
14 #define MLIR_TOOLS_MLIRTBLGEN_OPGENHELPERS_H_
16 #include "llvm/TableGen/Record.h"
17 #include <vector>
19 namespace mlir {
20 namespace tblgen {
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);
27 /// Checks whether `str` is a Python keyword or would shadow builtin function.
28 /// Regenerate using python -c"print(set(sorted(__import__('keyword').kwlist)))"
29 bool isPythonReserved(llvm::StringRef str);
31 } // namespace tblgen
32 } // namespace mlir
34 #endif // MLIR_TOOLS_MLIRTBLGEN_OPGENHELPERS_H_