clang 20.0.0git
ExtractAPIActionBase.h
Go to the documentation of this file.
1//===- ExtractAPI/ExtractAPIActionBase.h -----------------------------*- C++
2//-*-===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9///
10/// \file
11/// This file defines the ExtractAPIActionBase class.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_CLANG_EXTRACTAPI_ACTION_BASE_H
16#define LLVM_CLANG_EXTRACTAPI_ACTION_BASE_H
17
21#include "llvm/Support/raw_ostream.h"
22
23namespace clang {
24
25/// Base class to be used by front end actions to generate ExtarctAPI info
26///
27/// Deriving from this class equips an action with all the necessary tools to
28/// generate ExractAPI information in form of symbol-graphs
30protected:
31 /// A representation of the APIs this action extracts.
32 std::unique_ptr<extractapi::APISet> API;
33
34 /// A stream to the main output file of this action.
35 std::unique_ptr<llvm::raw_pwrite_stream> OS;
36
37 /// The product this action is extracting API information for.
38 std::string ProductName;
39
40 /// The synthesized input buffer that contains all the provided input header
41 /// files.
42 std::unique_ptr<llvm::MemoryBuffer> Buffer;
43
44 /// The list of symbols to ignore during serialization
46
47 /// Implements EndSourceFileAction for Symbol-Graph generation
48 ///
49 /// Use the serializer to generate output symbol graph files from
50 /// the information gathered during the execution of Action.
52};
53
54} // namespace clang
55
56#endif // LLVM_CLANG_EXTRACTAPI_ACTION_BASE_H
This file defines the APIRecord-based structs and the APISet class.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Base class to be used by front end actions to generate ExtarctAPI info.
std::string ProductName
The product this action is extracting API information for.
std::unique_ptr< llvm::MemoryBuffer > Buffer
The synthesized input buffer that contains all the provided input header files.
extractapi::APIIgnoresList IgnoresList
The list of symbols to ignore during serialization.
std::unique_ptr< llvm::raw_pwrite_stream > OS
A stream to the main output file of this action.
std::unique_ptr< extractapi::APISet > API
A representation of the APIs this action extracts.
void ImplEndSourceFileAction(CompilerInstance &CI)
Implements EndSourceFileAction for Symbol-Graph generation.
The JSON file list parser is used to communicate input to InstallAPI.
A type that provides access to a new line separated list of symbol names to ignore when extracting AP...