|
clang 22.0.0git
|
Provides top-level interfaces for incremental compilation and execution. More...
#include "clang/Interpreter/Interpreter.h"
Classes | |
| struct | JITConfig |
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 |
| uint32_t | getOutOfProcessExecutorPID () const |
Static Public Member Functions | |
| static llvm::Expected< std::unique_ptr< Interpreter > > | create (std::unique_ptr< CompilerInstance > CI, JITConfig Config={}) |
| static llvm::Expected< std::unique_ptr< Interpreter > > | createWithCUDA (std::unique_ptr< CompilerInstance > CI, std::unique_ptr< CompilerInstance > DCI) |
| static llvm::Expected< std::unique_ptr< llvm::orc::LLJITBuilder > > | createLLJITBuilder (std::unique_ptr< llvm::orc::ExecutorProcessControl > EPC, llvm::StringRef OrcRuntimePath) |
| static llvm::Expected< std::pair< std::unique_ptr< llvm::orc::LLJITBuilder >, uint32_t > > | outOfProcessJITBuilder (JITConfig Config) |
| static llvm::Expected< std::string > | getOrcRuntimePath (const driver::ToolChain &TC) |
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, JITConfig Config=JITConfig()) | |
| llvm::Error | CreateExecutor (JITConfig Config=JITConfig()) |
| void | ResetExecutor () |
Friends | |
| class | Value |
Provides top-level interfaces for incremental compilation and execution.
Definition at line 91 of file Interpreter.h.
|
protected |
Definition at line 253 of file Interpreter.cpp.
References clang::C, CreateExecutor(), and Execute().
Referenced by create(), and getCompilerInstance().
|
virtual |
Definition at line 310 of file Interpreter.cpp.
References toString().
|
static |
Definition at line 438 of file Interpreter.cpp.
References clang::C, getOrcRuntimePath(), clang::TargetInfo::getTriple(), Interpreter(), clang::Interpreter::JITConfig::IsOutOfProcess, clang::Interpreter::JITConfig::OrcRuntimePath, and clang::Runtimes.
Referenced by createWithCUDA().
Definition at line 633 of file Interpreter.cpp.
References clang::Interpreter::JITConfig::CM, clang::IncrementalExecutor::createDefaultJITBuilder(), clang::createJITTargetMachineBuilder(), clang::Interpreter::JITConfig::ExecutorPID, getCompilerInstance(), clang::CompilerInstance::getTargetOpts(), clang::Interpreter::JITConfig::IsOutOfProcess, outOfProcessJITBuilder(), and clang::TargetOptions::Triple.
Referenced by Execute(), getExecutionEngine(), and Interpreter().
|
static |
Definition at line 615 of file Interpreter.cpp.
References clang::IncrementalExecutor::createDefaultJITBuilder(), and clang::createJITTargetMachineBuilder().
Referenced by outOfProcessJITBuilder().
|
static |
Definition at line 487 of file Interpreter.cpp.
References create().
| llvm::Error clang::Interpreter::Execute | ( | PartialTranslationUnit & | T | ) |
Definition at line 692 of file Interpreter.cpp.
References CreateExecutor(), and clang::T.
Referenced by Interpreter(), and ParseAndExecute().
| ASTContext & clang::Interpreter::getASTContext | ( | ) |
Definition at line 546 of file Interpreter.cpp.
References clang::CompilerInstance::getASTContext(), and getCompilerInstance().
| const ASTContext & clang::Interpreter::getASTContext | ( | ) | const |
Definition at line 550 of file Interpreter.cpp.
References clang::CompilerInstance::getASTContext(), and getCompilerInstance().
Referenced by clang::Value::getASTContext().
| CompilerInstance * clang::Interpreter::getCompilerInstance | ( | ) |
Definition at line 532 of file Interpreter.cpp.
| const CompilerInstance * clang::Interpreter::getCompilerInstance | ( | ) | const |
Definition at line 533 of file Interpreter.cpp.
References getCompilerInstance(), and Interpreter().
Referenced by CreateExecutor(), getASTContext(), getASTContext(), getCompilerInstance(), and Parse().
| llvm::Expected< llvm::orc::LLJIT & > clang::Interpreter::getExecutionEngine | ( | ) |
Definition at line 537 of file Interpreter.cpp.
References CreateExecutor().
Referenced by LoadDynamicLibrary().
|
static |
Definition at line 396 of file Interpreter.cpp.
References clang::Found, clang::driver::ToolChain::getCompilerRTPath(), and clang::driver::ToolChain::getRuntimePath().
Referenced by create().
| uint32_t clang::Interpreter::getOutOfProcessExecutorPID | ( | ) | const |
Definition at line 564 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 736 of file Interpreter.cpp.
References getSymbolAddress().
Referenced by getSymbolAddress().
| 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 746 of file Interpreter.cpp.
References clang::IncrementalExecutor::IRName.
| 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 756 of file Interpreter.cpp.
References clang::IncrementalExecutor::LinkerName.
| llvm::Error clang::Interpreter::LoadDynamicLibrary | ( | const char * | name | ) |
Link a dynamic library.
Definition at line 791 of file Interpreter.cpp.
References getExecutionEngine().
|
static |
Definition at line 355 of file Interpreter.cpp.
References createLLJITBuilder(), clang::Interpreter::JITConfig::CustomizeFork, clang::IncrementalExecutor::launchExecutor(), clang::Interpreter::JITConfig::OOPExecutor, clang::Interpreter::JITConfig::OOPExecutorConnect, clang::Interpreter::JITConfig::OrcRuntimePath, clang::Interpreter::JITConfig::SlabAllocateSize, and clang::Interpreter::JITConfig::UseSharedMemory.
Referenced by CreateExecutor().
| llvm::Expected< PartialTranslationUnit & > clang::Interpreter::Parse | ( | llvm::StringRef | Code | ) |
Definition at line 571 of file Interpreter.cpp.
References getCompilerInstance(), clang::CompilerInstance::getDiagnostics(), clang::diag::Ignored, and clang::DiagnosticsEngine::setSeverity().
Definition at line 716 of file Interpreter.cpp.
References Execute(), clang::Parse, V, and Value.
|
protected |
Definition at line 690 of file Interpreter.cpp.
| llvm::Error clang::Interpreter::Undo | ( | unsigned | N = 1 | ) |
Undo N previous incremental inputs.
Definition at line 765 of file Interpreter.cpp.
|
friend |
Definition at line 92 of file Interpreter.h.
References Value.
Referenced by ParseAndExecute(), and Value.