13#ifndef LLVM_CLANG_LIB_INTERPRETER_INCREMENTALPARSER_H
14#define LLVM_CLANG_LIB_INTERPRETER_INCREMENTALPARSER_H
16#include "llvm/ADT/StringRef.h"
17#include "llvm/IR/Module.h"
18#include "llvm/Support/Error.h"
41 std::unique_ptr<Parser>
P;
52 std::list<PartialTranslationUnit> &
PTUs;
56 llvm::Error &Err, std::list<PartialTranslationUnit> &
PTUs);
68 std::unique_ptr<llvm::Module> M = {});
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
A custom action enabling the incremental processing functionality.
IncrementalParser(CompilerInstance &Instance, IncrementalAction *Act, llvm::Error &Err, std::list< PartialTranslationUnit > &PTUs)
IncrementalAction * Act
The FrontendAction used during incremental parsing.
std::list< PartialTranslationUnit > & PTUs
virtual ~IncrementalParser()
unsigned InputCount
Counts the number of direct user input lines that have been parsed.
void CleanUpPTU(TranslationUnitDecl *MostRecentTU)
PartialTranslationUnit & RegisterPTU(TranslationUnitDecl *TU, std::unique_ptr< llvm::Module > M={})
Register a PTU produced by Parse.
std::unique_ptr< Parser > P
Parser.
ASTConsumer * Consumer
Consumer to process the produced top level decls. Owned by Act.
Sema & S
The Sema performing the incremental compilation.
Parser - This implements a parser for the C family of languages.
Sema - This implements semantic analysis and AST building for C.
The top declaration context.
The JSON file list parser is used to communicate input to InstallAPI.
@ Parse
Parse the block; this code is always used.
The class keeps track of various objects created as part of processing incremental inputs.