clang 20.0.0git
|
Provides top-level interfaces for incremental compilation and execution. More...
#include "clang/Interpreter/Interpreter.h"
Public Member Functions | |
virtual | ~Interpreter () |
const ASTContext & | getASTContext () const |
ASTContext & | getASTContext () |
const CompilerInstance * | getCompilerInstance () const |
CompilerInstance * | getCompilerInstance () |
llvm::Expected< llvm::orc::LLJIT & > | getExecutionEngine () |
llvm::Expected< PartialTranslationUnit & > | Parse (llvm::StringRef Code) |
llvm::Error | Execute (PartialTranslationUnit &T) |
llvm::Error | ParseAndExecute (llvm::StringRef Code, Value *V=nullptr) |
llvm::Error | Undo (unsigned N=1) |
Undo N previous incremental inputs. | |
llvm::Error | LoadDynamicLibrary (const char *name) |
Link a dynamic library. | |
llvm::Expected< llvm::orc::ExecutorAddr > | getSymbolAddress (GlobalDecl GD) const |
llvm::Expected< llvm::orc::ExecutorAddr > | getSymbolAddress (llvm::StringRef IRName) const |
llvm::Expected< llvm::orc::ExecutorAddr > | getSymbolAddressFromLinkerName (llvm::StringRef LinkerName) const |
const llvm::SmallVectorImpl< Expr * > & | getValuePrintingInfo () const |
Expr * | SynthesizeExpr (Expr *E) |
Static Public Member Functions | |
static llvm::Expected< std::unique_ptr< Interpreter > > | create (std::unique_ptr< CompilerInstance > CI) |
static llvm::Expected< std::unique_ptr< Interpreter > > | createWithCUDA (std::unique_ptr< CompilerInstance > CI, std::unique_ptr< CompilerInstance > DCI) |
Protected Member Functions | |
Interpreter (std::unique_ptr< CompilerInstance > Instance, llvm::Error &Err, std::unique_ptr< llvm::orc::LLJITBuilder > JITBuilder=nullptr, std::unique_ptr< clang::ASTConsumer > Consumer=nullptr) | |
llvm::Error | CreateExecutor () |
void | ResetExecutor () |
Friends | |
class | Value |
Provides top-level interfaces for incremental compilation and execution.
Definition at line 85 of file Interpreter.h.
|
protected |
Definition at line 364 of file Interpreter.cpp.
References clang::C, CreateExecutor(), and Execute().
|
virtual |
Definition at line 415 of file Interpreter.cpp.
References toString().
|
static |
Definition at line 450 of file Interpreter.cpp.
References clang::Runtimes.
|
protected |
Definition at line 583 of file Interpreter.cpp.
Referenced by Interpreter().
|
static |
Definition at line 469 of file Interpreter.cpp.
llvm::Error clang::Interpreter::Execute | ( | PartialTranslationUnit & | T | ) |
Definition at line 618 of file Interpreter.cpp.
Referenced by Interpreter().
ASTContext & clang::Interpreter::getASTContext | ( | ) |
Definition at line 511 of file Interpreter.cpp.
const ASTContext & clang::Interpreter::getASTContext | ( | ) | const |
Definition at line 515 of file Interpreter.cpp.
Referenced by clang::Value::getASTContext().
CompilerInstance * clang::Interpreter::getCompilerInstance | ( | ) |
Definition at line 500 of file Interpreter.cpp.
const CompilerInstance * clang::Interpreter::getCompilerInstance | ( | ) | const |
Definition at line 496 of file Interpreter.cpp.
llvm::Expected< llvm::orc::LLJIT & > clang::Interpreter::getExecutionEngine | ( | ) |
Definition at line 502 of file Interpreter.cpp.
llvm::Expected< llvm::orc::ExecutorAddr > clang::Interpreter::getSymbolAddress | ( | GlobalDecl | GD | ) | const |
ExecutorAddr
of a GlobalDecl
. This interface uses the CodeGenModule's internal mangling cache to avoid recomputing the mangled name. Definition at line 663 of file Interpreter.cpp.
llvm::Expected< llvm::orc::ExecutorAddr > clang::Interpreter::getSymbolAddress | ( | llvm::StringRef | IRName | ) | const |
ExecutorAddr
of a given name as written in the IR. Definition at line 673 of file Interpreter.cpp.
llvm::Expected< llvm::orc::ExecutorAddr > clang::Interpreter::getSymbolAddressFromLinkerName | ( | llvm::StringRef | LinkerName | ) | const |
ExecutorAddr
of a given name as written in the object file. Definition at line 683 of file Interpreter.cpp.
|
inline |
Definition at line 166 of file Interpreter.h.
llvm::Error clang::Interpreter::LoadDynamicLibrary | ( | const char * | name | ) |
Link a dynamic library.
Definition at line 710 of file Interpreter.cpp.
llvm::Expected< PartialTranslationUnit & > clang::Interpreter::Parse | ( | llvm::StringRef | Code | ) |
Definition at line 552 of file Interpreter.cpp.
llvm::Error clang::Interpreter::ParseAndExecute | ( | llvm::StringRef | Code, |
Value * | V = nullptr |
||
) |
Definition at line 643 of file Interpreter.cpp.
|
protected |
Definition at line 616 of file Interpreter.cpp.
llvm::Error clang::Interpreter::Undo | ( | unsigned | N = 1 | ) |
Undo N previous incremental inputs.
Definition at line 692 of file Interpreter.cpp.
|
friend |
Definition at line 86 of file Interpreter.h.