class IncrementalParser
Declaration
class IncrementalParser { /* full declaration omitted */ };
Description
Provides support for incremental compilation. Keeps track of the state changes between the subsequent incremental input.
Declared at: clang/lib/Interpreter/IncrementalParser.h:39
Member Variables
- private std::unique_ptr<IncrementalAction> Act
- Long-lived, incremental parsing action.
- private std::unique_ptr<CompilerInstance> CI
- Compiler instance performing the incremental compilation.
- private std::unique_ptr<Parser> P
- Parser.
- private clang::ASTConsumer* Consumer = nullptr
- Consumer to process the produced top level decls. Owned by Act.
- private unsigned int InputCount = 0
- Counts the number of direct user input lines that have been parsed.
- private std::list<PartialTranslationUnit> PTUs
- List containing every information about every incrementally parsed piece of code.
Method Overview
- public void CleanUpPTU(clang::PartialTranslationUnit & PTU)
- public llvm::StringRef GetMangledName(clang::GlobalDecl GD) const
- public IncrementalParser(std::unique_ptr<CompilerInstance> Instance, llvm::LLVMContext & LLVMCtx, llvm::Error & Err)
- public llvm::Expected<PartialTranslationUnit &> Parse(llvm::StringRef Input)
- private llvm::Expected<PartialTranslationUnit &> ParseOrWrapTopLevelDecl()
- public const clang::CompilerInstance * getCI() const
- public std::list<PartialTranslationUnit> & getPTUs()
- public ~IncrementalParser()
Methods
¶void CleanUpPTU(
clang::PartialTranslationUnit& PTU)
void CleanUpPTU(
clang::PartialTranslationUnit& PTU)
Declared at: clang/lib/Interpreter/IncrementalParser.h:75
Parameters
¶llvm::StringRef GetMangledName(
clang::GlobalDecl GD) const
llvm::StringRef GetMangledName(
clang::GlobalDecl GD) const
Description
Uses the CodeGenModule mangled name cache and avoids recomputing.
Declared at: clang/lib/Interpreter/IncrementalParser.h:73
Parameters
Returns
the mangled name of a \c GD.
¶IncrementalParser(
std::unique_ptr<CompilerInstance> Instance,
llvm::LLVMContext& LLVMCtx,
llvm::Error& Err)
IncrementalParser(
std::unique_ptr<CompilerInstance> Instance,
llvm::LLVMContext& LLVMCtx,
llvm::Error& Err)
Declared at: clang/lib/Interpreter/IncrementalParser.h:60
Parameters
- std::unique_ptr<CompilerInstance> Instance
- llvm::LLVMContext& LLVMCtx
- llvm::Error& Err
¶llvm::Expected<PartialTranslationUnit&> Parse(
llvm::StringRef Input)
llvm::Expected<PartialTranslationUnit&> Parse(
llvm::StringRef Input)
Description
Parses incremental input by creating an in-memory file.
Declared at: clang/lib/Interpreter/IncrementalParser.h:69
Parameters
- llvm::StringRef Input
Returns
a \c PartialTranslationUnit which holds information about the\c TranslationUnitDecl and \c llvm::Module corresponding to the input.
¶llvm::Expected<PartialTranslationUnit&>
ParseOrWrapTopLevelDecl()
llvm::Expected<PartialTranslationUnit&>
ParseOrWrapTopLevelDecl()
Declared at: clang/lib/Interpreter/IncrementalParser.h:80
¶const clang::CompilerInstance* getCI() const
const clang::CompilerInstance* getCI() const
Declared at: clang/lib/Interpreter/IncrementalParser.h:64
¶std::list<PartialTranslationUnit>& getPTUs()
std::list<PartialTranslationUnit>& getPTUs()
Declared at: clang/lib/Interpreter/IncrementalParser.h:77
¶~IncrementalParser()
~IncrementalParser()
Declared at: clang/lib/Interpreter/IncrementalParser.h:62