clang 17.0.0git
|
Provides top-level interfaces for incremental compilation and execution. More...
#include "clang/Interpreter/Interpreter.h"
Public Member Functions | |
~Interpreter () | |
const CompilerInstance * | getCompilerInstance () const |
const llvm::orc::LLJIT * | getExecutionEngine () const |
llvm::Expected< PartialTranslationUnit & > | Parse (llvm::StringRef Code) |
llvm::Error | Execute (PartialTranslationUnit &T) |
llvm::Error | ParseAndExecute (llvm::StringRef Code) |
llvm::Error | Undo (unsigned N=1) |
Undo N previous incremental inputs. | |
llvm::Expected< llvm::JITTargetAddress > | getSymbolAddress (GlobalDecl GD) const |
llvm::Expected< llvm::JITTargetAddress > | getSymbolAddress (llvm::StringRef IRName) const |
llvm::Expected< llvm::JITTargetAddress > | getSymbolAddressFromLinkerName (llvm::StringRef LinkerName) const |
Static Public Member Functions | |
static llvm::Expected< std::unique_ptr< Interpreter > > | create (std::unique_ptr< CompilerInstance > CI) |
Provides top-level interfaces for incremental compilation and execution.
Definition at line 48 of file Interpreter.h.
Interpreter::~Interpreter | ( | ) |
Definition at line 183 of file Interpreter.cpp.
References toString().
|
static |
Definition at line 193 of file Interpreter.cpp.
llvm::Error Interpreter::Execute | ( | PartialTranslationUnit & | T | ) |
Definition at line 217 of file Interpreter.cpp.
References clang::CompilerInstance::getASTContext(), getCompilerInstance(), clang::ASTContext::getTargetInfo(), and clang::PartialTranslationUnit::TheModule.
Referenced by ParseAndExecute().
const CompilerInstance * Interpreter::getCompilerInstance | ( | ) | const |
Definition at line 202 of file Interpreter.cpp.
Referenced by Execute().
const llvm::orc::LLJIT * Interpreter::getExecutionEngine | ( | ) | const |
Definition at line 206 of file Interpreter.cpp.
llvm::Expected< llvm::JITTargetAddress > Interpreter::getSymbolAddress | ( | GlobalDecl | GD | ) | const |
JITTargetAddress
of a GlobalDecl
. This interface uses the CodeGenModule's internal mangling cache to avoid recomputing the mangled name. Definition at line 239 of file Interpreter.cpp.
References getSymbolAddress().
Referenced by getSymbolAddress().
llvm::Expected< llvm::JITTargetAddress > Interpreter::getSymbolAddress | ( | llvm::StringRef | IRName | ) | const |
JITTargetAddress
of a given name as written in the IR. Definition at line 249 of file Interpreter.cpp.
References clang::IncrementalExecutor::IRName.
llvm::Expected< llvm::JITTargetAddress > Interpreter::getSymbolAddressFromLinkerName | ( | llvm::StringRef | LinkerName | ) | const |
JITTargetAddress
of a given name as written in the object file. Definition at line 259 of file Interpreter.cpp.
References clang::IncrementalExecutor::LinkerName.
llvm::Expected< PartialTranslationUnit & > Interpreter::Parse | ( | llvm::StringRef | Code | ) |
Definition at line 213 of file Interpreter.cpp.
Referenced by ParseAndExecute().
|
inline |
Definition at line 63 of file Interpreter.h.
llvm::Error Interpreter::Undo | ( | unsigned | N = 1 | ) |
Undo N previous incremental inputs.
Definition at line 268 of file Interpreter.cpp.