1 | //===-- APINotesYAMLCompiler.h - API Notes YAML Format Reader ---*- 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_CLANG_APINOTES_APINOTESYAMLCOMPILER_H |
10 | #define LLVM_CLANG_APINOTES_APINOTESYAMLCOMPILER_H |
11 | |
12 | #include "llvm/ADT/StringRef.h" |
13 | #include "llvm/Support/SourceMgr.h" |
14 | #include "llvm/Support/raw_ostream.h" |
15 | |
16 | namespace clang { |
17 | class FileEntry; |
18 | } // namespace clang |
19 | |
20 | namespace clang { |
21 | namespace api_notes { |
22 | /// Parses the APINotes YAML content and writes the representation back to the |
23 | /// specified stream. This provides a means of testing the YAML processing of |
24 | /// the APINotes format. |
25 | bool parseAndDumpAPINotes(llvm::StringRef YI, llvm::raw_ostream &OS); |
26 | |
27 | /// Converts API notes from YAML format to binary format. |
28 | bool compileAPINotes(llvm::StringRef YAMLInput, const FileEntry *SourceFile, |
29 | llvm::raw_ostream &OS, |
30 | llvm::SourceMgr::DiagHandlerTy DiagHandler = nullptr, |
31 | void *DiagHandlerCtxt = nullptr); |
32 | } // namespace api_notes |
33 | } // namespace clang |
34 | |
35 | #endif |
36 | |