LLVM  14.0.0git
Public Member Functions | Static Public Attributes | Friends | List of all members
llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc Class Reference

Represents a finalized allocation. More...

#include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"

Collaboration diagram for llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc:
Collaboration graph
[legend]

Public Member Functions

 FinalizedAlloc ()=default
 
 FinalizedAlloc (JITTargetAddress A)
 
 FinalizedAlloc (const FinalizedAlloc &)=delete
 
 FinalizedAlloc (FinalizedAlloc &&Other)
 
FinalizedAllocoperator= (const FinalizedAlloc &)=delete
 
FinalizedAllocoperator= (FinalizedAlloc &&Other)
 
 ~FinalizedAlloc ()
 
 operator bool () const
 FinalizedAllocs convert to false for default-constructed, and true otherwise. More...
 
JITTargetAddress getAddress () const
 Returns the address associated with this finalized allocation. More...
 
JITTargetAddress release ()
 Returns the address associated with this finalized allocation and resets this object to the default state. More...
 

Static Public Attributes

static constexpr JITTargetAddress InvalidAddr = ~JITTargetAddress(0)
 

Friends

class JITLinkMemoryManager
 

Detailed Description

Represents a finalized allocation.

Finalized allocations must be passed to the JITLinkMemoryManager:deallocate method prior to being destroyed.

The interpretation of the Address associated with the finalized allocation is up to the memory manager implementation. Common options are using the base address of the allocation, or the address of a memory management object that tracks the allocation.

Definition at line 92 of file JITLinkMemoryManager.h.

Constructor & Destructor Documentation

◆ FinalizedAlloc() [1/4]

llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::FinalizedAlloc ( )
default

◆ FinalizedAlloc() [2/4]

llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::FinalizedAlloc ( JITTargetAddress  A)
inlineexplicit

Definition at line 99 of file JITLinkMemoryManager.h.

References A, and assert().

◆ FinalizedAlloc() [3/4]

llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::FinalizedAlloc ( const FinalizedAlloc )
delete

◆ FinalizedAlloc() [4/4]

llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::FinalizedAlloc ( FinalizedAlloc &&  Other)
inline

Definition at line 103 of file JITLinkMemoryManager.h.

References InvalidAddr, and Other.

◆ ~FinalizedAlloc()

llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::~FinalizedAlloc ( )
inline

Definition at line 113 of file JITLinkMemoryManager.h.

References A, assert(), and InvalidAddr.

Member Function Documentation

◆ getAddress()

JITTargetAddress llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::getAddress ( ) const
inline

◆ operator bool()

llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::operator bool ( ) const
inlineexplicit

FinalizedAllocs convert to false for default-constructed, and true otherwise.

Default-constructed allocs need not be deallocated.

Definition at line 119 of file JITLinkMemoryManager.h.

References A, and InvalidAddr.

◆ operator=() [1/2]

FinalizedAlloc& llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::operator= ( const FinalizedAlloc )
delete

◆ operator=() [2/2]

FinalizedAlloc& llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::operator= ( FinalizedAlloc &&  Other)
inline

Definition at line 107 of file JITLinkMemoryManager.h.

References A, assert(), InvalidAddr, Other, and std::swap().

◆ release()

JITTargetAddress llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::release ( )
inline

Returns the address associated with this finalized allocation and resets this object to the default state.

This should only be used by allocators when deallocating memory.

Definition at line 128 of file JITLinkMemoryManager.h.

References A, and InvalidAddr.

Friends And Related Function Documentation

◆ JITLinkMemoryManager

friend class JITLinkMemoryManager
friend

Definition at line 93 of file JITLinkMemoryManager.h.

Member Data Documentation

◆ InvalidAddr

constexpr JITTargetAddress llvm::jitlink::JITLinkMemoryManager::FinalizedAlloc::InvalidAddr = ~JITTargetAddress(0)
staticconstexpr

The documentation for this class was generated from the following file: