LLVM 22.0.0git
|
API to remove / transfer ownership of JIT resources. More...
#include "llvm/ExecutionEngine/Orc/Core.h"
Public Member Functions | |
ResourceTracker (const ResourceTracker &)=delete | |
ResourceTracker & | operator= (const ResourceTracker &)=delete |
ResourceTracker (ResourceTracker &&)=delete | |
ResourceTracker & | operator= (ResourceTracker &&)=delete |
LLVM_ABI | ~ResourceTracker () |
JITDylib & | getJITDylib () const |
Return the JITDylib targeted by this tracker. | |
template<typename Func> | |
Error | withResourceKeyDo (Func &&F) |
Runs the given callback under the session lock, passing in the associated ResourceKey. | |
LLVM_ABI Error | remove () |
Remove all resources associated with this key. | |
LLVM_ABI void | transferTo (ResourceTracker &DstRT) |
Transfer all resources associated with this key to the given tracker, which must target the same JITDylib as this one. | |
bool | isDefunct () const |
Return true if this tracker has become defunct. | |
ResourceKey | getKeyUnsafe () const |
Returns the key associated with this tracker. | |
Public Member Functions inherited from llvm::ThreadSafeRefCountedBase< ResourceTracker > | |
unsigned | UseCount () const |
void | Retain () const |
void | Release () const |
Friends | |
class | ExecutionSession |
class | JITDylib |
class | MaterializationResponsibility |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::ThreadSafeRefCountedBase< ResourceTracker > | |
ThreadSafeRefCountedBase ()=default | |
ThreadSafeRefCountedBase & | operator= (const ThreadSafeRefCountedBase &)=delete |
~ThreadSafeRefCountedBase () |
|
delete |
References ResourceTracker().
Referenced by operator=(), operator=(), ResourceTracker(), ResourceTracker(), and transferTo().
|
delete |
References ResourceTracker().
llvm::orc::ResourceTracker::~ResourceTracker | ( | ) |
Definition at line 50 of file Core.cpp.
References llvm::orc::JITDylib::getExecutionSession(), getJITDylib(), and llvm::ThreadSafeRefCountedBase< Derived >::Release().
|
inline |
Return the JITDylib targeted by this tracker.
Definition at line 93 of file Core.h.
References JITDylib.
Referenced by llvm::orc::RedirectableSymbolManager::createRedirectableSymbols(), llvm::orc::COFFPlatform::notifyAdding(), llvm::orc::ELFNixPlatform::notifyAdding(), llvm::orc::MachOPlatform::notifyAdding(), remove(), transferTo(), withResourceKeyDo(), and ~ResourceTracker().
|
inline |
Returns the key associated with this tracker.
This method should not be used except for debug logging: there is no guarantee that the returned value will remain valid.
Definition at line 115 of file Core.h.
Referenced by withResourceKeyDo().
|
inline |
Return true if this tracker has become defunct.
Definition at line 110 of file Core.h.
Referenced by withResourceKeyDo().
|
delete |
References ResourceTracker().
|
delete |
References LLVM_ABI, and ResourceTracker().
Error llvm::orc::ResourceTracker::remove | ( | ) |
Remove all resources associated with this key.
Definition at line 55 of file Core.cpp.
References llvm::orc::JITDylib::getExecutionSession(), and getJITDylib().
Referenced by LLVMOrcResourceTrackerRemove().
void llvm::orc::ResourceTracker::transferTo | ( | ResourceTracker & | DstRT | ) |
Transfer all resources associated with this key to the given tracker, which must target the same JITDylib as this one.
Definition at line 59 of file Core.cpp.
References llvm::orc::JITDylib::getExecutionSession(), getJITDylib(), and ResourceTracker().
Referenced by LLVMOrcResourceTrackerTransferTo().
Error llvm::orc::ResourceTracker::withResourceKeyDo | ( | Func && | F | ) |
Runs the given callback under the session lock, passing in the associated ResourceKey.
This is the safe way to associate resources with trackers.
Definition at line 1850 of file Core.h.
References F, llvm::orc::JITDylib::getExecutionSession(), getJITDylib(), getKeyUnsafe(), isDefunct(), llvm::make_error(), llvm::orc::ExecutionSession::runSessionLocked(), and llvm::Error::success().
|
friend |
|
friend |
Definition at line 81 of file Core.h.
References JITDylib.
Referenced by getJITDylib(), and JITDylib.
|
friend |
Definition at line 82 of file Core.h.
References MaterializationResponsibility.
Referenced by MaterializationResponsibility.