clang 20.0.0git
|
Provides support for incremental compilation. More...
Public Member Functions | |
IncrementalParser (CompilerInstance &Instance, llvm::Error &Err) | |
virtual | ~IncrementalParser () |
virtual llvm::Expected< TranslationUnitDecl * > | Parse (llvm::StringRef Input) |
Parses incremental input by creating an in-memory file. | |
void | CleanUpPTU (TranslationUnitDecl *MostRecentTU) |
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. | |
Provides support for incremental compilation.
Keeps track of the state changes between the subsequent incremental input.
Definition at line 33 of file IncrementalParser.h.
clang::IncrementalParser::IncrementalParser | ( | CompilerInstance & | Instance, |
llvm::Error & | Err | ||
) |
Definition at line 29 of file IncrementalParser.cpp.
References Consumer, clang::Sema::getASTConsumer(), clang::Sema::getPreprocessor(), P, and S.
|
virtual |
Definition at line 38 of file IncrementalParser.cpp.
References P.
void clang::IncrementalParser::CleanUpPTU | ( | TranslationUnitDecl * | MostRecentTU | ) |
Definition at line 154 of file IncrementalParser.cpp.
References D, clang::DeclContext::decls(), clang::DeclContext::getLookupPtr(), clang::DeclContext::getPrimaryContext(), clang::Sema::IdResolver, clang::IdentifierResolver::RemoveDecl(), and S.
|
virtual |
Parses incremental input by creating an in-memory file.
PartialTranslationUnit
which holds information about the TranslationUnitDecl
. Reimplemented in clang::IncrementalCUDADeviceParser.
Definition at line 98 of file IncrementalParser.cpp.
References clang::SrcMgr::C_User, clang::Preprocessor::EnterSourceFile(), clang::Preprocessor::getLangOpts(), clang::Sema::getPreprocessor(), clang::Sema::getSourceManager(), InputCount, clang::Token::is(), clang::Preprocessor::isIncrementalProcessingEnabled(), clang::Token::isNot(), clang::Preprocessor::Lex(), memcpy(), S, and SM.
Referenced by clang::IncrementalCUDADeviceParser::Parse().
|
protected |
Consumer to process the produced top level decls. Owned by Act.
Definition at line 42 of file IncrementalParser.h.
Referenced by IncrementalParser().
|
protected |
Counts the number of direct user input lines that have been parsed.
Definition at line 45 of file IncrementalParser.h.
Referenced by Parse().
|
protected |
Definition at line 39 of file IncrementalParser.h.
Referenced by IncrementalParser(), and ~IncrementalParser().
|
protected |
The Sema performing the incremental compilation.
Definition at line 36 of file IncrementalParser.h.
Referenced by CleanUpPTU(), IncrementalParser(), and Parse().