clang 22.0.0git
clang::IncrementalParser Class Reference

Provides support for incremental compilation. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Interpreter/IncrementalParser.h"

Inheritance diagram for clang::IncrementalParser:
[legend]

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)
PartialTranslationUnitRegisterPTU (TranslationUnitDecl *TU, std::unique_ptr< llvm::Module > M={})
 Register a PTU produced by Parse.

Protected Attributes

SemaS
 The Sema performing the incremental compilation.
std::unique_ptr< ParserP
 Parser.
ASTConsumerConsumer = 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.
IncrementalActionAct = nullptr
 The FrontendAction used during incremental parsing.
std::list< PartialTranslationUnit > & PTUs

Detailed Description

Provides support for incremental compilation.

Keeps track of the state changes between the subsequent incremental input.

Definition at line 38 of file IncrementalParser.h.

Constructor & Destructor Documentation

◆ IncrementalParser()

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().

◆ ~IncrementalParser()

clang::IncrementalParser::~IncrementalParser ( )
virtual

Definition at line 43 of file IncrementalParser.cpp.

References P.

Member Function Documentation

◆ CleanUpPTU()

void clang::IncrementalParser::CleanUpPTU ( TranslationUnitDecl * MostRecentTU)

◆ Parse()

llvm::Expected< TranslationUnitDecl * > clang::IncrementalParser::Parse ( llvm::StringRef Input)
virtual

◆ RegisterPTU()

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.

Member Data Documentation

◆ Act

IncrementalAction* clang::IncrementalParser::Act = nullptr
protected

The FrontendAction used during incremental parsing.

Definition at line 53 of file IncrementalParser.h.

Referenced by IncrementalParser(), and RegisterPTU().

◆ Consumer

ASTConsumer* clang::IncrementalParser::Consumer = nullptr
protected

Consumer to process the produced top level decls. Owned by Act.

Definition at line 47 of file IncrementalParser.h.

Referenced by IncrementalParser().

◆ InputCount

unsigned clang::IncrementalParser::InputCount = 0
protected

Counts the number of direct user input lines that have been parsed.

Definition at line 50 of file IncrementalParser.h.

Referenced by Parse().

◆ P

std::unique_ptr<Parser> clang::IncrementalParser::P
protected

Parser.

Definition at line 44 of file IncrementalParser.h.

Referenced by IncrementalParser(), and ~IncrementalParser().

◆ PTUs

◆ S

Sema& clang::IncrementalParser::S
protected

The Sema performing the incremental compilation.

Definition at line 41 of file IncrementalParser.h.

Referenced by CleanUpPTU(), IncrementalParser(), and Parse().


The documentation for this class was generated from the following files: