LLVM 22.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::CaptureInfo Class Reference

Represents which components of the pointer may be captured in which location. More...

#include "llvm/Support/ModRef.h"

Public Member Functions

 CaptureInfo (CaptureComponents OtherComponents, CaptureComponents RetComponents)
 
 CaptureInfo (CaptureComponents Components)
 
bool isRetOnly () const
 Whether the pointer is only captured via the return value.
 
CaptureComponents getRetComponents () const
 Get components potentially captured by the return value.
 
CaptureComponents getOtherComponents () const
 Get components potentially captured through locations other than the return value.
 
 operator CaptureComponents () const
 Get the potentially captured components of the pointer (regardless of location).
 
bool operator== (CaptureInfo Other) const
 
bool operator!= (CaptureInfo Other) const
 
CaptureInfo operator| (CaptureInfo Other) const
 Compute union of CaptureInfos.
 
CaptureInfo operator& (CaptureInfo Other) const
 Compute intersection of CaptureInfos.
 
CaptureInfooperator|= (CaptureInfo Other)
 Compute union of CaptureInfos in-place.
 
CaptureInfooperator&= (CaptureInfo Other)
 Compute intersection of CaptureInfos in-place.
 
uint32_t toIntValue () const
 Convert CaptureInfo into an encoded integer value (used by captures attribute).
 

Static Public Member Functions

static CaptureInfo none ()
 Create CaptureInfo that does not capture any components of the pointer.
 
static CaptureInfo all ()
 Create CaptureInfo that may capture all components of the pointer.
 
static CaptureInfo retOnly (CaptureComponents RetComponents=CaptureComponents::All)
 Create CaptureInfo that may only capture via the return value.
 
static CaptureInfo createFromIntValue (uint32_t Data)
 

Detailed Description

Represents which components of the pointer may be captured in which location.

This represents the captures(...) attribute in IR.

For more information on the precise semantics see LangRef.

Definition at line 354 of file ModRef.h.

Constructor & Destructor Documentation

◆ CaptureInfo() [1/2]

llvm::CaptureInfo::CaptureInfo ( CaptureComponents  OtherComponents,
CaptureComponents  RetComponents 
)
inline

Definition at line 359 of file ModRef.h.

◆ CaptureInfo() [2/2]

llvm::CaptureInfo::CaptureInfo ( CaptureComponents  Components)
inline

Definition at line 363 of file ModRef.h.

Member Function Documentation

◆ all()

static CaptureInfo llvm::CaptureInfo::all ( )
inlinestatic

Create CaptureInfo that may capture all components of the pointer.

Definition at line 370 of file ModRef.h.

References llvm::All.

Referenced by llvm::AttributeSet::getCaptureInfo(), llvm::AttributeSetNode::getCaptureInfo(), and llvm::CallBase::getCaptureInfo().

◆ createFromIntValue()

static CaptureInfo llvm::CaptureInfo::createFromIntValue ( uint32_t  Data)
inlinestatic

Definition at line 425 of file ModRef.h.

References llvm::Data.

Referenced by llvm::Attribute::getCaptureInfo().

◆ getOtherComponents()

CaptureComponents llvm::CaptureInfo::getOtherComponents ( ) const
inline

Get components potentially captured through locations other than the return value.

Definition at line 386 of file ModRef.h.

Referenced by llvm::AAResults::callCapturesBefore(), llvm::DetermineUseCaptureKind(), llvm::CallBase::hasArgumentWithAdditionalReturnCaptureComponents(), and llvm::operator<<().

◆ getRetComponents()

CaptureComponents llvm::CaptureInfo::getRetComponents ( ) const
inline

Get components potentially captured by the return value.

Definition at line 382 of file ModRef.h.

Referenced by llvm::DetermineUseCaptureKind(), llvm::CallBase::hasArgumentWithAdditionalReturnCaptureComponents(), and llvm::operator<<().

◆ isRetOnly()

bool llvm::CaptureInfo::isRetOnly ( ) const
inline

Whether the pointer is only captured via the return value.

Definition at line 379 of file ModRef.h.

References llvm::capturesNothing().

◆ none()

static CaptureInfo llvm::CaptureInfo::none ( )
inlinestatic

Create CaptureInfo that does not capture any components of the pointer.

Definition at line 367 of file ModRef.h.

References llvm::None.

Referenced by addArgumentAttrs(), decodeLLVMAttributesForBitcode(), llvm::CallBase::getCaptureInfo(), llvm::AANoCapture::isImpliedByIR(), and setDoesNotCapture().

◆ operator CaptureComponents()

llvm::CaptureInfo::operator CaptureComponents ( ) const
inline

Get the potentially captured components of the pointer (regardless of location).

Definition at line 390 of file ModRef.h.

◆ operator!=()

bool llvm::CaptureInfo::operator!= ( CaptureInfo  Other) const
inline

Definition at line 397 of file ModRef.h.

References llvm::Other.

◆ operator&()

CaptureInfo llvm::CaptureInfo::operator& ( CaptureInfo  Other) const
inline

Compute intersection of CaptureInfos.

Definition at line 406 of file ModRef.h.

References llvm::Other.

◆ operator&=()

CaptureInfo & llvm::CaptureInfo::operator&= ( CaptureInfo  Other)
inline

Compute intersection of CaptureInfos in-place.

Definition at line 419 of file ModRef.h.

References llvm::Other.

◆ operator==()

bool llvm::CaptureInfo::operator== ( CaptureInfo  Other) const
inline

Definition at line 392 of file ModRef.h.

References llvm::Other.

◆ operator|()

CaptureInfo llvm::CaptureInfo::operator| ( CaptureInfo  Other) const
inline

Compute union of CaptureInfos.

Definition at line 400 of file ModRef.h.

References llvm::Other.

◆ operator|=()

CaptureInfo & llvm::CaptureInfo::operator|= ( CaptureInfo  Other)
inline

Compute union of CaptureInfos in-place.

Definition at line 412 of file ModRef.h.

References llvm::Other.

◆ retOnly()

static CaptureInfo llvm::CaptureInfo::retOnly ( CaptureComponents  RetComponents = CaptureComponents::All)
inlinestatic

Create CaptureInfo that may only capture via the return value.

Definition at line 374 of file ModRef.h.

References llvm::None.

◆ toIntValue()

uint32_t llvm::CaptureInfo::toIntValue ( ) const
inline

Convert CaptureInfo into an encoded integer value (used by captures attribute).

Definition at line 432 of file ModRef.h.

Referenced by llvm::AttrBuilder::addCapturesAttr(), and llvm::Attribute::getWithCaptureInfo().


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