Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:54

0001 //===- ExtractAPI/ExtractAPIActionBase.h -----------------------------*- C++
0002 //-*-===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 ///
0010 /// \file
0011 /// This file defines the ExtractAPIActionBase class.
0012 ///
0013 //===----------------------------------------------------------------------===//
0014 
0015 #ifndef LLVM_CLANG_EXTRACTAPI_ACTION_BASE_H
0016 #define LLVM_CLANG_EXTRACTAPI_ACTION_BASE_H
0017 
0018 #include "clang/ExtractAPI/API.h"
0019 #include "clang/ExtractAPI/APIIgnoresList.h"
0020 #include "clang/Frontend/CompilerInstance.h"
0021 #include "llvm/Support/raw_ostream.h"
0022 
0023 namespace clang {
0024 
0025 /// Base class to be used by front end actions to generate ExtarctAPI info
0026 ///
0027 /// Deriving from this class equips an action with all the necessary tools to
0028 /// generate ExractAPI information in form of symbol-graphs
0029 class ExtractAPIActionBase {
0030 protected:
0031   /// A representation of the APIs this action extracts.
0032   std::unique_ptr<extractapi::APISet> API;
0033 
0034   /// A stream to the main output file of this action.
0035   std::unique_ptr<llvm::raw_pwrite_stream> OS;
0036 
0037   /// The product this action is extracting API information for.
0038   std::string ProductName;
0039 
0040   /// The synthesized input buffer that contains all the provided input header
0041   /// files.
0042   std::unique_ptr<llvm::MemoryBuffer> Buffer;
0043 
0044   /// The list of symbols to ignore during serialization
0045   extractapi::APIIgnoresList IgnoresList;
0046 
0047   /// Implements EndSourceFileAction for Symbol-Graph generation
0048   ///
0049   /// Use the serializer to generate output symbol graph files from
0050   /// the information gathered during the execution of Action.
0051   void ImplEndSourceFileAction(CompilerInstance &CI);
0052 };
0053 
0054 } // namespace clang
0055 
0056 #endif // LLVM_CLANG_EXTRACTAPI_ACTION_BASE_H