clang 22.0.0git
|
Provides support for incremental compilation. More...
Public Member Functions | |
IncrementalParser (CompilerInstance &Instance, IncrementalAction *Act, llvm::Error &Err, std::list< PartialTranslationUnit > &PTUs) | |
virtual | ~IncrementalParser () |
virtual llvm::Expected< TranslationUnitDecl * > | Parse (llvm::StringRef Input) |
Parses incremental input by creating an in-memory file. | |
void | CleanUpPTU (TranslationUnitDecl *MostRecentTU) |
PartialTranslationUnit & | RegisterPTU (TranslationUnitDecl *TU, std::unique_ptr< llvm::Module > M={}) |
Register a PTU produced by Parse. |
Protected Attributes | |
Sema & | S |
The Sema performing the incremental compilation. | |
std::unique_ptr< Parser > | P |
Parser. | |
ASTConsumer * | Consumer = nullptr |
Consumer to process the produced top level decls. Owned by Act. | |
unsigned | InputCount = 0 |
Counts the number of direct user input lines that have been parsed. | |
IncrementalAction * | Act = nullptr |
The FrontendAction used during incremental parsing. | |
std::list< PartialTranslationUnit > & | PTUs |
Provides support for incremental compilation.
Keeps track of the state changes between the subsequent incremental input.
Definition at line 38 of file IncrementalParser.h.
clang::IncrementalParser::IncrementalParser | ( | CompilerInstance & | Instance, |
IncrementalAction * | Act, | ||
llvm::Error & | Err, | ||
std::list< PartialTranslationUnit > & | PTUs ) |
Definition at line 33 of file IncrementalParser.cpp.
References Act, Consumer, P, PTUs, and S.
Referenced by clang::IncrementalCUDADeviceParser::IncrementalCUDADeviceParser().
|
virtual |
Definition at line 43 of file IncrementalParser.cpp.
References P.
void clang::IncrementalParser::CleanUpPTU | ( | TranslationUnitDecl * | MostRecentTU | ) |
Definition at line 160 of file IncrementalParser.cpp.
References clang::DeclContext::decls(), clang::DeclContext::getLookupPtr(), clang::DeclContext::getPrimaryContext(), and S.
|
virtual |
Parses incremental input by creating an in-memory file.
PartialTranslationUnit
which holds information about the TranslationUnitDecl
. Definition at line 104 of file IncrementalParser.cpp.
References clang::SrcMgr::C_User, clang::Preprocessor::EnterSourceFile(), clang::Preprocessor::getLangOpts(), InputCount, clang::Token::is(), clang::Preprocessor::isIncrementalProcessingEnabled(), clang::Preprocessor::Lex(), memcpy(), S, SM, and Tok.
PartialTranslationUnit & clang::IncrementalParser::RegisterPTU | ( | TranslationUnitDecl * | TU, |
std::unique_ptr< llvm::Module > | M = {} ) |
Register a PTU produced by Parse.
Definition at line 194 of file IncrementalParser.cpp.
References Act, PTUs, clang::PartialTranslationUnit::TheModule, and clang::PartialTranslationUnit::TUPart.
|
protected |
The FrontendAction used during incremental parsing.
Definition at line 53 of file IncrementalParser.h.
Referenced by IncrementalParser(), and RegisterPTU().
|
protected |
Consumer to process the produced top level decls. Owned by Act.
Definition at line 47 of file IncrementalParser.h.
Referenced by IncrementalParser().
|
protected |
Counts the number of direct user input lines that have been parsed.
Definition at line 50 of file IncrementalParser.h.
Referenced by Parse().
|
protected |
Definition at line 44 of file IncrementalParser.h.
Referenced by IncrementalParser(), and ~IncrementalParser().
|
protected |
Definition at line 55 of file IncrementalParser.h.
Referenced by clang::IncrementalCUDADeviceParser::GenerateFatbinary(), clang::IncrementalCUDADeviceParser::GeneratePTX(), clang::IncrementalCUDADeviceParser::IncrementalCUDADeviceParser(), IncrementalParser(), and RegisterPTU().
|
protected |
The Sema performing the incremental compilation.
Definition at line 41 of file IncrementalParser.h.
Referenced by CleanUpPTU(), IncrementalParser(), and Parse().