clang 20.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
clang::CodeGen::RawAddress Class Reference

An abstract representation of an aligned address. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/Address.h"

Inheritance diagram for clang::CodeGen::RawAddress:
Inheritance graph
[legend]

Public Member Functions

 RawAddress (llvm::Value *Pointer, llvm::Type *ElementType, CharUnits Alignment, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
 
 RawAddress (Address Addr)
 
bool isValid () const
 
llvm::Value * getPointer () const
 
llvm::PointerType * getType () const
 Return the type of the pointer value.
 
llvm::Type * getElementType () const
 Return the type of the values stored in this address.
 
unsigned getAddressSpace () const
 Return the address space that this address resides in.
 
llvm::StringRef getName () const
 Return the IR name of the pointer value.
 
CharUnits getAlignment () const
 Return the alignment of this pointer.
 
RawAddress withElementType (llvm::Type *ElemTy) const
 Return address with different element type, but same pointer and alignment.
 
KnownNonNull_t isKnownNonNull () const
 

Static Public Member Functions

static RawAddress invalid ()
 

Protected Member Functions

 RawAddress (std::nullptr_t)
 

Detailed Description

An abstract representation of an aligned address.

This is designed to be an IR-level abstraction, carrying just the information necessary to perform IR operations on an address like loads and stores. In particular, it doesn't carry C type information or allow the representation of things like bit-fields; clients working at that level should generally be using LValue. The pointer contained in this class is known to be unsigned.

Definition at line 42 of file Address.h.

Constructor & Destructor Documentation

◆ RawAddress() [1/3]

clang::CodeGen::RawAddress::RawAddress ( std::nullptr_t  )
inlineprotected

Definition at line 48 of file Address.h.

◆ RawAddress() [2/3]

clang::CodeGen::RawAddress::RawAddress ( llvm::Value *  Pointer,
llvm::Type *  ElementType,
CharUnits  Alignment,
KnownNonNull_t  IsKnownNonNull = NotKnownNonNull 
)
inline

Definition at line 51 of file Address.h.

References Pointer.

◆ RawAddress() [3/3]

clang::CodeGen::RawAddress::RawAddress ( Address  Addr)
inline

Definition at line 285 of file Address.h.

Member Function Documentation

◆ getAddressSpace()

unsigned clang::CodeGen::RawAddress::getAddressSpace ( ) const
inline

Return the address space that this address resides in.

Definition at line 83 of file Address.h.

References getType().

◆ getAlignment()

CharUnits clang::CodeGen::RawAddress::getAlignment ( ) const
inline

◆ getElementType()

llvm::Type * clang::CodeGen::RawAddress::getElementType ( ) const
inline

Return the type of the values stored in this address.

Definition at line 77 of file Address.h.

References isValid().

Referenced by clang::CodeGen::ConstantAddress::castImpl(), castToBase(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), and MaybeConvertMatrixAddress().

◆ getName()

llvm::StringRef clang::CodeGen::RawAddress::getName ( ) const
inline

Return the IR name of the pointer value.

Definition at line 88 of file Address.h.

References getPointer().

◆ getPointer()

llvm::Value * clang::CodeGen::RawAddress::getPointer ( ) const
inline

◆ getType()

llvm::PointerType * clang::CodeGen::RawAddress::getType ( ) const
inline

Return the type of the pointer value.

Definition at line 72 of file Address.h.

References getPointer(), and getType().

Referenced by getAddressSpace(), and getType().

◆ invalid()

static RawAddress clang::CodeGen::RawAddress::invalid ( )
inlinestatic

◆ isKnownNonNull()

KnownNonNull_t clang::CodeGen::RawAddress::isKnownNonNull ( ) const
inline

Definition at line 104 of file Address.h.

References isValid().

Referenced by withElementType().

◆ isValid()

bool clang::CodeGen::RawAddress::isValid ( ) const
inline

◆ withElementType()

RawAddress clang::CodeGen::RawAddress::withElementType ( llvm::Type *  ElemTy) const
inline

Return address with different element type, but same pointer and alignment.

Definition at line 100 of file Address.h.

References getAlignment(), getPointer(), and isKnownNonNull().

Referenced by MaybeConvertMatrixAddress().


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