A smart pointer to a reference‐counted object that inherits from RefCountedBase or ThreadSafeRefCountedBase.

Synopsis

Declared in <llvm/ADT/IntrusiveRefCntPtr.h>

template<typename T>
class IntrusiveRefCntPtr;

Description

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).

Type Aliases

Name

Description

element_type

Type of the managed object.

Member Functions

Name

Description

IntrusiveRefCntPtr [constructor]

Constructors

~IntrusiveRefCntPtr [destructor]

Release the pointee if non‐null.

operator=

Copy‐assign via swap with S.

get

Return the raw pointer without affecting the reference count.

operator*

Dereference the pointee.

operator‐>

Return a pointer to the pointee.

reset

Release the current pointee and set to null.

resetWithoutRelease

Clear the pointer without decrementing the pointee's reference count.

swap

Exchange pointees with other.

useCount

Return the pointee's reference count, or zero if empty.

operator bool

Return true if this pointer is non‐null.

Friends

Name

Description

llvm::IntrusiveRefCntPtr

A smart pointer to a reference‐counted object that inherits from RefCountedBase or ThreadSafeRefCountedBase.

Non-Member Functions

Name

Description

makeIntrusiveRefCnt

Factory function for creating intrusive ref counted pointers.

operator!=

Return true if A and B point to different objects.

operator!=

Return true if A is non‐empty.

operator!=

Return true if A points to a different object than raw pointer B.

operator==

Return true if A points to the same object as raw pointer B.

operator==

Return true if A is empty.

operator==

Return true if A and B point to the same object.

vfs::getRealFileSystem

Gets an vfs::FileSystem for the 'real' file system, as seen by the operating system. The working directory is linked to the process's working directory. (This is usually thread‐hostile). This may only be called outside the IO sandbox.

vfs::makeFilteringOutputBackend

Make a backend where OutputBackend::createFile() forwards to UnderlyingBackend when Filter is true, and otherwise returns a NullOutput.

vfs::makeMirroringOutputBackend

Create a backend that forwards OutputBackend::createFile() to both Backend1 and Backend2. Writing to such backend will create identical outputs using two different backends.

vfs::makeNullOutputBackend

Create a backend that ignores all output.

Created with MrDocs