LLVM 22.0.0git
|
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. | |
CaptureInfo & | operator|= (CaptureInfo Other) |
Compute union of CaptureInfos in-place. | |
CaptureInfo & | operator&= (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) |
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.
|
inline |
|
inline |
|
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().
|
inlinestatic |
Definition at line 425 of file ModRef.h.
References llvm::Data.
Referenced by llvm::Attribute::getCaptureInfo().
|
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<<().
|
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<<().
|
inline |
Whether the pointer is only captured via the return value.
Definition at line 379 of file ModRef.h.
References llvm::capturesNothing().
|
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().
|
inline |
|
inline |
Definition at line 397 of file ModRef.h.
References llvm::Other.
|
inline |
Compute intersection of CaptureInfos.
Definition at line 406 of file ModRef.h.
References llvm::Other.
|
inline |
Compute intersection of CaptureInfos in-place.
Definition at line 419 of file ModRef.h.
References llvm::Other.
|
inline |
Definition at line 392 of file ModRef.h.
References llvm::Other.
|
inline |
|
inline |
Compute union of CaptureInfos in-place.
Definition at line 412 of file ModRef.h.
References llvm::Other.
|
inlinestatic |
Create CaptureInfo that may only capture via the return value.
Definition at line 374 of file ModRef.h.
References llvm::None.
|
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().