13#ifndef LLVM_CLANG_LIB_INTERPRETER_INCREMENTALPARSER_H
14#define LLVM_CLANG_LIB_INTERPRETER_INCREMENTALPARSER_H
19#include "llvm/ADT/ArrayRef.h"
20#include "llvm/ADT/StringRef.h"
21#include "llvm/Support/Error.h"
32class CompilerInstance;
33class IncrementalAction;
42 std::unique_ptr<IncrementalAction>
Act;
45 std::unique_ptr<CompilerInstance>
CI;
48 std::unique_ptr<Parser>
P;
58 std::list<PartialTranslationUnit>
PTUs;
64 std::unique_ptr<CompilerInstance> Instance,
65 llvm::LLVMContext &LLVMCtx, llvm::Error &Err);
84 std::unique_ptr<llvm::Module>
GenModule();
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.
The primary public interface to the Clang code generator.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
GlobalDecl - represents a global declaration.
Provides support for incremental compilation.
std::list< PartialTranslationUnit > PTUs
List containing every information about every incrementally parsed piece of code.
llvm::StringRef GetMangledName(GlobalDecl GD) const
Uses the CodeGenModule mangled name cache and avoids recomputing.
std::unique_ptr< IncrementalAction > Act
Long-lived, incremental parsing action.
virtual llvm::Expected< PartialTranslationUnit & > Parse(llvm::StringRef Input)
Parses incremental input by creating an in-memory file.
CompilerInstance * getCI()
std::unique_ptr< CompilerInstance > CI
Compiler instance performing the incremental compilation.
virtual ~IncrementalParser()
void CleanUpPTU(PartialTranslationUnit &PTU)
unsigned InputCount
Counts the number of direct user input lines that have been parsed.
std::unique_ptr< llvm::Module > GenModule()
std::list< PartialTranslationUnit > & getPTUs()
std::unique_ptr< Parser > P
Parser.
ASTConsumer * Consumer
Consumer to process the produced top level decls. Owned by Act.
CodeGenerator * getCodeGen() const
Provides top-level interfaces for incremental compilation and execution.
YAML serialization mapping.
The class keeps track of various objects created as part of processing incremental inputs.