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 16namespace clang { 17class FileEntry; 18} // namespace clang 19 20namespace clang { 21namespace 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. 25bool parseAndDumpAPINotes(llvm::StringRef YI, llvm::raw_ostream &OS); 26 27/// Converts API notes from YAML format to binary format. 28bool 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