| 1 | //===- CppGenUtilities.h - MLIR cpp gen utilities ---------------*- 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 common utilities for generating cpp files from tablegen |
| 10 | // structures. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef MLIR_TOOLS_MLIRTBLGEN_CPPGENUTILITIES_H_ |
| 15 | #define MLIR_TOOLS_MLIRTBLGEN_CPPGENUTILITIES_H_ |
| 16 | |
| 17 | #include "llvm/ADT/StringRef.h" |
| 18 | |
| 19 | namespace mlir { |
| 20 | namespace tblgen { |
| 21 | |
| 22 | // Emit the summary and description as a C++ comment, perperly aligned placed |
| 23 | // adjacent to the class declaration of generated classes. |
| 24 | std::string emitSummaryAndDescComments(llvm::StringRef summary, |
| 25 | llvm::StringRef description); |
| 26 | } // namespace tblgen |
| 27 | } // namespace mlir |
| 28 | |
| 29 | #endif // MLIR_TOOLS_MLIRTBLGEN_CPPGENUTILITIES_H_ |
| 30 | |