class IntrusiveRefCntPtr

Declaration

template <typename T>
class IntrusiveRefCntPtr { /* full declaration omitted */ };

Description

A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCountedBase. This class increments its pointee's reference count when it is created, and decrements its refcount when it's destroyed (or is changed to point to a different object).

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:168

Templates

T

Member Variables

private T* Obj = nullptr

Method Overview

Methods

IntrusiveRefCntPtr<T>()

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:174

IntrusiveRefCntPtr<T>(T* obj)

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:175

Parameters

T* obj

IntrusiveRefCntPtr<T>(
    const IntrusiveRefCntPtr<T>& S)

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:176

Parameters

const IntrusiveRefCntPtr<T>& S

IntrusiveRefCntPtr<T>(IntrusiveRefCntPtr<T>&& S)

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:177

Parameters

IntrusiveRefCntPtr<T>&& S

template <class X,
          std::enable_if_t<
              std::is_convertible<X*, T*>::value,
              bool> = true>
IntrusiveRefCntPtr<T>(IntrusiveRefCntPtr<X> S)

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:181

Templates

X
std::enable_if_t::value, bool> = true

Parameters

IntrusiveRefCntPtr<X> S

template <class X,
          std::enable_if_t<
              std::is_convertible<X*, T*>::value,
              bool> = true>
IntrusiveRefCntPtr<T>(std::unique_ptr<X> S)

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:187

Templates

X
std::enable_if_t::value, bool> = true

Parameters

std::unique_ptr<X> S

T* get() const

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:200

bool operator bool() const

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:201

void release()

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:222

void reset()

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:209

void resetWithoutRelease()

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:214

void retain()

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:217

void swap(IntrusiveRefCntPtr<T>& other)

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:203

Parameters

IntrusiveRefCntPtr<T>& other

~IntrusiveRefCntPtr<T>()

Declared at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:191