llvm::DataLayout::getAddressSize

Returns the integral address size in bytes for address space AS.

Synopsis

Declared in <llvm/IR/DataLayout.h>

unsigned int
getAddressSize(unsigned int AS) const;

Description

This is defined to be the same as getIndexSize(). This exists as a separate function to make it clearer when reading code that the size of an address is being requested. While targets exist where index size and the underlying address width are not identical (e.g. AMDGPU fat pointers with 48-bit addresses and 32-bit offsets indexing), there is currently no need to differentiate these properties in LLVM.

Return Value

The integral address size in bytes for address space AS.

Parameters

NameDescription
ASAddress space whose address size is requested.