1 | //===-- Implementation of PublicAPICommand ----------------------*- 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 | #ifndef LLVM_LIBC_UTILS_HDRGEN_PUBLICAPICOMMAND_H |
10 | #define LLVM_LIBC_UTILS_HDRGEN_PUBLICAPICOMMAND_H |
11 | |
12 | #include "Command.h" |
13 | |
14 | #include "llvm/ADT/StringRef.h" |
15 | #include "llvm/TableGen/Error.h" |
16 | #include "llvm/TableGen/Record.h" |
17 | |
18 | namespace llvm { |
19 | |
20 | class raw_ostream; |
21 | class Record; |
22 | class RecordKeeper; |
23 | |
24 | } // namespace llvm |
25 | |
26 | namespace llvm_libc { |
27 | |
28 | enum class AttributeStyle { Cxx11 = 0, Gnu = 1, Declspec = 2 }; |
29 | enum class AttributeNamespace { None = 0, Clang = 1, Gnu = 2 }; |
30 | |
31 | class PublicAPICommand : public Command { |
32 | private: |
33 | const std::vector<std::string> &EntrypointNameList; |
34 | |
35 | public: |
36 | static const char Name[]; |
37 | |
38 | PublicAPICommand(const std::vector<std::string> &EntrypointNames) |
39 | : EntrypointNameList(EntrypointNames) {} |
40 | |
41 | void run(llvm::raw_ostream &OS, const ArgVector &Args, |
42 | llvm::StringRef , llvm::RecordKeeper &Records, |
43 | const Command::ErrorReporter &Reporter) const override; |
44 | }; |
45 | |
46 | } // namespace llvm_libc |
47 | |
48 | #endif // LLVM_LIBC_UTILS_HDRGEN_PUBLICAPICOMMAND_H |
49 | |