clang
22.0.0git
include
clang
InstallAPI
Frontend.h
Go to the documentation of this file.
1
//===- InstallAPI/Frontend.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
/// Top level wrappers for InstallAPI frontend operations.
10
///
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_CLANG_INSTALLAPI_FRONTEND_H
14
#define LLVM_CLANG_INSTALLAPI_FRONTEND_H
15
16
#include "
clang/AST/ASTConsumer.h
"
17
#include "
clang/Frontend/CompilerInstance.h
"
18
#include "
clang/Frontend/FrontendActions.h
"
19
#include "
clang/InstallAPI/Context.h
"
20
#include "
clang/InstallAPI/DylibVerifier.h
"
21
#include "
clang/InstallAPI/Visitor.h
"
22
#include "llvm/ADT/Twine.h"
23
#include "llvm/Support/MemoryBuffer.h"
24
25
namespace
clang
{
26
namespace
installapi
{
27
28
/// Create a buffer that contains all headers to scan
29
/// for global symbols with.
30
std::unique_ptr<llvm::MemoryBuffer>
createInputBuffer
(
InstallAPIContext
&Ctx);
31
32
class
InstallAPIAction
:
public
ASTFrontendAction
{
33
public
:
34
explicit
InstallAPIAction
(
InstallAPIContext
&Ctx) : Ctx(Ctx) {}
35
36
std::unique_ptr<ASTConsumer>
CreateASTConsumer
(
CompilerInstance
&CI,
37
StringRef InFile)
override
{
38
Ctx.Diags->getClient()->BeginSourceFile(CI.
getLangOpts
());
39
Ctx.Verifier->setSourceManager(CI.
getSourceManagerPtr
());
40
return
std::make_unique<InstallAPIVisitor>(
41
CI.
getASTContext
(), Ctx, CI.
getSourceManager
(), CI.
getPreprocessor
());
42
}
43
44
private
:
45
InstallAPIContext
&Ctx;
46
};
47
}
// namespace installapi
48
}
// namespace clang
49
50
#endif
// LLVM_CLANG_INSTALLAPI_FRONTEND_H
ASTConsumer.h
CompilerInstance.h
DylibVerifier.h
FrontendActions.h
Visitor.h
clang::ASTFrontendAction::ASTFrontendAction
ASTFrontendAction()
Definition
FrontendAction.h:265
clang::CompilerInstance
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Definition
CompilerInstance.h:82
clang::CompilerInstance::getPreprocessor
Preprocessor & getPreprocessor() const
Return the current preprocessor.
Definition
CompilerInstance.h:514
clang::CompilerInstance::getASTContext
ASTContext & getASTContext() const
Definition
CompilerInstance.h:534
clang::CompilerInstance::getLangOpts
LangOptions & getLangOpts()
Definition
CompilerInstance.h:315
clang::CompilerInstance::getSourceManager
SourceManager & getSourceManager() const
Return the current source manager.
Definition
CompilerInstance.h:489
clang::CompilerInstance::getSourceManagerPtr
IntrusiveRefCntPtr< SourceManager > getSourceManagerPtr() const
Definition
CompilerInstance.h:494
clang::installapi::InstallAPIAction::CreateASTConsumer
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
Definition
Frontend.h:36
clang::installapi::InstallAPIAction::InstallAPIAction
InstallAPIAction(InstallAPIContext &Ctx)
Definition
Frontend.h:34
Context.h
clang::installapi
The DirectoryScanner for collecting library files on the file system.
Definition
Context.h:20
clang::installapi::createInputBuffer
std::unique_ptr< llvm::MemoryBuffer > createInputBuffer(InstallAPIContext &Ctx)
Create a buffer that contains all headers to scan for global symbols with.
Definition
Frontend.cpp:135
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition
CalledOnceCheck.h:17
clang::installapi::InstallAPIContext
Struct used for generating validating InstallAPI.
Definition
Context.h:26
Generated on
for clang by
1.14.0