LLVM 20.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 |
~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. | |
Error | remove () |
Remove all resources associated with this key. | |
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 (const ThreadSafeRefCountedBase &) | |
ThreadSafeRefCountedBase & | operator= (const ThreadSafeRefCountedBase &)=delete |
~ThreadSafeRefCountedBase () | |
|
delete |
|
delete |
llvm::orc::ResourceTracker::~ResourceTracker | ( | ) |
Definition at line 49 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 71 of file Core.h.
Referenced by 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 93 of file Core.h.
Referenced by withResourceKeyDo().
|
inline |
Return true if this tracker has become defunct.
Definition at line 88 of file Core.h.
Referenced by withResourceKeyDo().
|
delete |
|
delete |
Error llvm::orc::ResourceTracker::remove | ( | ) |
Remove all resources associated with this key.
Definition at line 54 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 58 of file Core.cpp.
References llvm::orc::JITDylib::getExecutionSession(), and getJITDylib().
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 1878 of file Core.h.
References F, llvm::orc::JITDylib::getExecutionSession(), getJITDylib(), getKeyUnsafe(), isDefunct(), llvm::orc::ExecutionSession::runSessionLocked(), and llvm::Error::success().
|
friend |
|
friend |