Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
llvm::OffsetSpan Struct Reference

OffsetSpan - Used internally by ObjectSizeOffsetVisitor. More...

#include "llvm/Analysis/MemoryBuiltins.h"

Public Member Functions

 OffsetSpan ()=default
 Number of allocated bytes after this point.
 OffsetSpan (APInt Before, APInt After)
bool knownBefore () const
bool knownAfter () const
bool anyKnown () const
bool bothKnown () const
bool operator== (const OffsetSpan &RHS) const
bool operator!= (const OffsetSpan &RHS) const

Static Public Member Functions

static bool known (const APInt &V)

Public Attributes

APInt Before
APInt After
 Number of allocated bytes before this point.

Detailed Description

OffsetSpan - Used internally by ObjectSizeOffsetVisitor.

Represents a point in memory as a pair of allocated bytes before and after it.

Before and After fields are signed values. It makes it possible to represent out-of-bound access, e.g. as a result of a GEP, at the expense of not being able to represent very large allocation.

Definition at line 246 of file MemoryBuiltins.h.

Constructor & Destructor Documentation

◆ OffsetSpan() [1/2]

llvm::OffsetSpan::OffsetSpan ( )
default

Number of allocated bytes after this point.

Referenced by operator!=(), and operator==().

◆ OffsetSpan() [2/2]

llvm::OffsetSpan::OffsetSpan ( APInt Before,
APInt After )
inline

Definition at line 251 of file MemoryBuiltins.h.

References After, and Before.

Member Function Documentation

◆ anyKnown()

bool llvm::OffsetSpan::anyKnown ( ) const
inline

Definition at line 255 of file MemoryBuiltins.h.

References knownAfter(), and knownBefore().

◆ bothKnown()

bool llvm::OffsetSpan::bothKnown ( ) const
inline

◆ known()

bool llvm::OffsetSpan::known ( const APInt & V)
inlinestatic

Definition at line 263 of file MemoryBuiltins.h.

Referenced by knownAfter(), and knownBefore().

◆ knownAfter()

bool llvm::OffsetSpan::knownAfter ( ) const
inline

Definition at line 254 of file MemoryBuiltins.h.

References After, and known().

Referenced by anyKnown(), bothKnown(), and llvm::ObjectSizeOffsetVisitor::compute().

◆ knownBefore()

bool llvm::OffsetSpan::knownBefore ( ) const
inline

Definition at line 253 of file MemoryBuiltins.h.

References Before, and known().

Referenced by anyKnown(), bothKnown(), and llvm::ObjectSizeOffsetVisitor::compute().

◆ operator!=()

bool llvm::OffsetSpan::operator!= ( const OffsetSpan & RHS) const
inline

Definition at line 261 of file MemoryBuiltins.h.

References OffsetSpan(), and RHS.

◆ operator==()

bool llvm::OffsetSpan::operator== ( const OffsetSpan & RHS) const
inline

Definition at line 258 of file MemoryBuiltins.h.

References After, Before, OffsetSpan(), and RHS.

Member Data Documentation

◆ After

APInt llvm::OffsetSpan::After

Number of allocated bytes before this point.

Definition at line 248 of file MemoryBuiltins.h.

Referenced by llvm::ObjectSizeOffsetVisitor::compute(), knownAfter(), OffsetSpan(), and operator==().

◆ Before

APInt llvm::OffsetSpan::Before

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