clang API Documentation
#include <FrontendActions.h>
Static Public Member Functions | |
static bool | ComputeASTConsumerArguments (CompilerInstance &CI, StringRef InFile, std::string &Sysroot, std::string &OutputFile, raw_ostream *&OS) |
Compute the AST consumer arguments that will be used to create the PCHGenerator instance returned by CreateASTConsumer. | |
Protected Member Functions | |
std::unique_ptr< ASTConsumer > | CreateASTConsumer (CompilerInstance &CI, StringRef InFile) override |
Create the AST consumer object for this action, if supported. | |
TranslationUnitKind | getTranslationUnitKind () override |
For AST-based actions, the kind of translation unit we're handling. | |
bool | hasASTFileSupport () const override |
Does this action support use with AST files? |
Definition at line 72 of file Frontend/FrontendActions.h.
bool GeneratePCHAction::ComputeASTConsumerArguments | ( | CompilerInstance & | CI, |
StringRef | InFile, | ||
std::string & | Sysroot, | ||
std::string & | OutputFile, | ||
raw_ostream *& | OS | ||
) | [static] |
Compute the AST consumer arguments that will be used to create the PCHGenerator instance returned by CreateASTConsumer.
Definition at line 92 of file Frontend/FrontendActions.cpp.
References clang::CompilerInstance::createOutputFile(), clang::CompilerInstance::getDiagnostics(), clang::CompilerInstance::getFrontendOpts(), clang::CompilerInstance::getHeaderSearchOpts(), clang::FrontendOptions::OutputFile, clang::FrontendOptions::RelocatablePCH, clang::DiagnosticsEngine::Report(), and clang::HeaderSearchOptions::Sysroot.
Referenced by CreateASTConsumer().
std::unique_ptr< ASTConsumer > GeneratePCHAction::CreateASTConsumer | ( | CompilerInstance & | CI, |
StringRef | InFile | ||
) | [override, protected, virtual] |
Create the AST consumer object for this action, if supported.
This routine is called as part of BeginSourceFile(), which will fail if the AST consumer cannot be created. This will not be called if the action has indicated that it only uses the preprocessor.
CI | - The current compiler instance, provided as a convenience, see getCompilerInstance(). |
InFile | - The current input file, provided as a convenience, see getCurrentFile(). |
Implements clang::FrontendAction.
Definition at line 79 of file Frontend/FrontendActions.cpp.
References ComputeASTConsumerArguments(), clang::CompilerInstance::getFrontendOpts(), clang::CompilerInstance::getPreprocessor(), and clang::FrontendOptions::RelocatablePCH.
TranslationUnitKind clang::GeneratePCHAction::getTranslationUnitKind | ( | ) | [inline, override, protected, virtual] |
For AST-based actions, the kind of translation unit we're handling.
Reimplemented from clang::FrontendAction.
Definition at line 77 of file Frontend/FrontendActions.h.
References clang::TU_Prefix.
bool clang::GeneratePCHAction::hasASTFileSupport | ( | ) | const [inline, override, protected, virtual] |
Does this action support use with AST files?
Reimplemented from clang::FrontendAction.
Definition at line 81 of file Frontend/FrontendActions.h.