clang 22.0.0git
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:
[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

◆ 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 clang::CodeGen::NotKnownNonNull, and Pointer.

◆ RawAddress() [3/3]

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

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

◆ 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 RawAddress().

◆ 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()

◆ getType()

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

◆ invalid()

◆ isKnownNonNull()

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

Definition at line 104 of file Address.h.

References isValid().

Referenced by RawAddress(), and withElementType().

◆ isValid()

◆ 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(), isKnownNonNull(), and RawAddress().


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