1 | //===- InstallAPI/FileList.h ------------------------------------*- 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 | /// The JSON file list parser is used to communicate input to InstallAPI. |
10 | /// |
11 | //===----------------------------------------------------------------------===// |
12 | |
13 | #ifndef LLVM_CLANG_INSTALLAPI_FILELIST_H |
14 | #define LLVM_CLANG_INSTALLAPI_FILELIST_H |
15 | |
16 | #include "clang/Basic/Diagnostic.h" |
17 | #include "clang/Basic/FileManager.h" |
18 | #include "clang/InstallAPI/HeaderFile.h" |
19 | #include "llvm/Support/Error.h" |
20 | #include "llvm/Support/MemoryBuffer.h" |
21 | |
22 | namespace clang { |
23 | namespace installapi { |
24 | |
25 | class FileListReader { |
26 | public: |
27 | /// Decode JSON input and append header input into destination container. |
28 | /// Headers are loaded in the order they appear in the JSON input. |
29 | /// |
30 | /// \param InputBuffer JSON input data. |
31 | /// \param Destination Container to load headers into. |
32 | static llvm::Error |
33 | (std::unique_ptr<llvm::MemoryBuffer> InputBuffer, |
34 | HeaderSeq &Destination); |
35 | |
36 | FileListReader() = delete; |
37 | }; |
38 | |
39 | } // namespace installapi |
40 | } // namespace clang |
41 | |
42 | #endif // LLVM_CLANG_INSTALLAPI_FILELIST_H |
43 | |