LLVM 24.0.0git
Collaboration diagram for Data Layout:

Typedefs

typedef struct LLVMOpaqueTargetData * LLVMTargetDataRef

Enumerations

enum  LLVMByteOrdering { LLVMBigEndian , LLVMLittleEndian }

Functions

LLVM_C_ABI LLVMTargetDataRef LLVMGetModuleDataLayout (LLVMModuleRef M)
 Obtain the data layout for a module.
LLVM_C_ABI void LLVMSetModuleDataLayout (LLVMModuleRef M, LLVMTargetDataRef DL)
 Set the data layout for a module.
LLVM_C_ABI LLVMTargetDataRef LLVMCreateTargetData (const char *StringRep)
 Creates target data from a target layout string.
LLVM_C_ABI void LLVMDisposeTargetData (LLVMTargetDataRef TD)
 Deallocates a TargetData.
LLVM_C_ABI char * LLVMCopyStringRepOfTargetData (LLVMTargetDataRef TD)
 Converts target data to a target layout string.
LLVM_C_ABI enum LLVMByteOrdering LLVMByteOrder (LLVMTargetDataRef TD)
 Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian.
LLVM_C_ABI unsigned LLVMPointerSize (LLVMTargetDataRef TD)
 Returns the pointer size in bytes for a target.
LLVM_C_ABI unsigned LLVMPointerSizeForAS (LLVMTargetDataRef TD, unsigned AS)
 Returns the pointer size in bytes for a target for a specified address space.
LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED (LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD), "Use of the global context is deprecated, use " "LLVMIntPtrTypeInContext instead")
 Returns the integer type that is the same size as a pointer on a target.
LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED (LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS), "Use of the global context is deprecated, use LLVMIntPtrTypeForASInContext " "instead")
 Returns the integer type that is the same size as a pointer on a target.
LLVM_C_ABI LLVMTypeRef LLVMIntPtrTypeInContext (LLVMContextRef C, LLVMTargetDataRef TD)
 Returns the integer type that is the same size as a pointer on a target.
LLVM_C_ABI LLVMTypeRef LLVMIntPtrTypeForASInContext (LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS)
 Returns the integer type that is the same size as a pointer on a target.
LLVM_C_ABI unsigned long long LLVMSizeOfTypeInBits (LLVMTargetDataRef TD, LLVMTypeRef Ty)
 Computes the size of a type in bits for a target.
LLVM_C_ABI unsigned long long LLVMStoreSizeOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
 Computes the storage size of a type in bytes for a target.
LLVM_C_ABI unsigned long long LLVMABISizeOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
 Computes the ABI size of a type in bytes for a target.
LLVM_C_ABI unsigned LLVMABIAlignmentOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
 Computes the ABI alignment of a type in bytes for a target.
LLVM_C_ABI unsigned LLVMCallFrameAlignmentOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
 Computes the call frame alignment of a type in bytes for a target.
LLVM_C_ABI unsigned LLVMPreferredAlignmentOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
 Computes the preferred alignment of a type in bytes for a target.
LLVM_C_ABI unsigned LLVMPreferredAlignmentOfGlobal (LLVMTargetDataRef TD, LLVMValueRef GlobalVar)
 Computes the preferred alignment of a global variable in bytes for a target.
LLVM_C_ABI unsigned LLVMElementAtOffset (LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset)
 Computes the structure element that contains the byte offset for a target.
LLVM_C_ABI unsigned long long LLVMOffsetOfElement (LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned Element)
 Computes the byte offset of the indexed struct element for a target.

Detailed Description

Typedef Documentation

◆ LLVMTargetDataRef

typedef struct LLVMOpaqueTargetData* LLVMTargetDataRef

Definition at line 5379 of file Core.h.

Enumeration Type Documentation

◆ LLVMByteOrdering

Enumerator
LLVMBigEndian 
LLVMLittleEndian 

Definition at line 5377 of file Core.h.

Function Documentation

◆ LLVM_ATTRIBUTE_C_DEPRECATED() [1/2]

LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED ( LLVMTypeRef LLVMIntPtrTypeLLVMTargetDataRef TD,
"Use of the global context is deprecated,
use " "LLVMIntPtrTypeInContext instead"  )

Returns the integer type that is the same size as a pointer on a target.

See the method llvm::DataLayout::getIntPtrType.

◆ LLVM_ATTRIBUTE_C_DEPRECATED() [2/2]

LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED ( LLVMTypeRef LLVMIntPtrTypeForASLLVMTargetDataRef TD, unsigned AS,
"Use of the global context is deprecated,
use LLVMIntPtrTypeForASInContext " "instead"  )

Returns the integer type that is the same size as a pointer on a target.

This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType.

References C(), LLVM_C_ABI, and LLVM_C_EXTERN_C_END.

◆ LLVMABIAlignmentOfType()

LLVM_C_ABI unsigned LLVMABIAlignmentOfType ( LLVMTargetDataRef TD,
LLVMTypeRef Ty )

Computes the ABI alignment of a type in bytes for a target.

See the method llvm::DataLayout::getTypeABISize.

Definition at line 4863 of file Core.cpp.

References llvm::unwrap().

◆ LLVMABISizeOfType()

LLVM_C_ABI unsigned long long LLVMABISizeOfType ( LLVMTargetDataRef TD,
LLVMTypeRef Ty )

Computes the ABI size of a type in bytes for a target.

See the method llvm::DataLayout::getTypeAllocSize.

Definition at line 4859 of file Core.cpp.

References llvm::unwrap().

◆ LLVMByteOrder()

LLVM_C_ABI enum LLVMByteOrdering LLVMByteOrder ( LLVMTargetDataRef TD)

Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian.

See the method llvm::DataLayout::isLittleEndian.

Definition at line 4821 of file Core.cpp.

References LLVMBigEndian, LLVMLittleEndian, and llvm::unwrap().

◆ LLVMCallFrameAlignmentOfType()

LLVM_C_ABI unsigned LLVMCallFrameAlignmentOfType ( LLVMTargetDataRef TD,
LLVMTypeRef Ty )

Computes the call frame alignment of a type in bytes for a target.

See the method llvm::DataLayout::getTypeABISize.

Definition at line 4867 of file Core.cpp.

References llvm::unwrap().

◆ LLVMCopyStringRepOfTargetData()

LLVM_C_ABI char * LLVMCopyStringRepOfTargetData ( LLVMTargetDataRef TD)

Converts target data to a target layout string.

The string must be disposed with LLVMDisposeMessage. See the constructor llvm::DataLayout::DataLayout.

Definition at line 4816 of file Core.cpp.

References llvm::unwrap().

◆ LLVMCreateTargetData()

LLVM_C_ABI LLVMTargetDataRef LLVMCreateTargetData ( const char * StringRep)

Creates target data from a target layout string.

See the constructor llvm::DataLayout::DataLayout.

Definition at line 4810 of file Core.cpp.

References llvm::wrap().

◆ LLVMDisposeTargetData()

LLVM_C_ABI void LLVMDisposeTargetData ( LLVMTargetDataRef TD)

Deallocates a TargetData.

See the destructor llvm::DataLayout::~DataLayout.

Definition at line 4814 of file Core.cpp.

References llvm::unwrap().

◆ LLVMElementAtOffset()

LLVM_C_ABI unsigned LLVMElementAtOffset ( LLVMTargetDataRef TD,
LLVMTypeRef StructTy,
unsigned long long Offset )

Computes the structure element that contains the byte offset for a target.

See the method llvm::StructLayout::getElementContainingOffset.

Definition at line 4882 of file Core.cpp.

References llvm::Offset, and llvm::unwrap().

◆ LLVMGetModuleDataLayout()

LLVM_C_ABI LLVMTargetDataRef LLVMGetModuleDataLayout ( LLVMModuleRef M)

Obtain the data layout for a module.

See also
Module::getDataLayout()

Definition at line 4802 of file Core.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMIntPtrTypeForASInContext()

LLVM_C_ABI LLVMTypeRef LLVMIntPtrTypeForASInContext ( LLVMContextRef C,
LLVMTargetDataRef TD,
unsigned AS )

Returns the integer type that is the same size as a pointer on a target.

This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType.

Definition at line 4846 of file Core.cpp.

References C(), llvm::unwrap(), and llvm::wrap().

◆ LLVMIntPtrTypeInContext()

LLVM_C_ABI LLVMTypeRef LLVMIntPtrTypeInContext ( LLVMContextRef C,
LLVMTargetDataRef TD )

Returns the integer type that is the same size as a pointer on a target.

See the method llvm::DataLayout::getIntPtrType.

Definition at line 4842 of file Core.cpp.

References C(), llvm::unwrap(), and llvm::wrap().

◆ LLVMOffsetOfElement()

LLVM_C_ABI unsigned long long LLVMOffsetOfElement ( LLVMTargetDataRef TD,
LLVMTypeRef StructTy,
unsigned Element )

Computes the byte offset of the indexed struct element for a target.

See the method llvm::StructLayout::getElementContainingOffset.

Definition at line 4888 of file Core.cpp.

References llvm::unwrap().

◆ LLVMPointerSize()

LLVM_C_ABI unsigned LLVMPointerSize ( LLVMTargetDataRef TD)

Returns the pointer size in bytes for a target.

See the method llvm::DataLayout::getPointerSize.

Definition at line 4825 of file Core.cpp.

References llvm::unwrap().

◆ LLVMPointerSizeForAS()

LLVM_C_ABI unsigned LLVMPointerSizeForAS ( LLVMTargetDataRef TD,
unsigned AS )

Returns the pointer size in bytes for a target for a specified address space.

See the method llvm::DataLayout::getPointerSize.

Definition at line 4829 of file Core.cpp.

References llvm::unwrap().

◆ LLVMPreferredAlignmentOfGlobal()

LLVM_C_ABI unsigned LLVMPreferredAlignmentOfGlobal ( LLVMTargetDataRef TD,
LLVMValueRef GlobalVar )

Computes the preferred alignment of a global variable in bytes for a target.

See the method llvm::DataLayout::getPreferredAlignment.

Definition at line 4875 of file Core.cpp.

References llvm::unwrap().

◆ LLVMPreferredAlignmentOfType()

LLVM_C_ABI unsigned LLVMPreferredAlignmentOfType ( LLVMTargetDataRef TD,
LLVMTypeRef Ty )

Computes the preferred alignment of a type in bytes for a target.

See the method llvm::DataLayout::getTypeABISize.

Definition at line 4871 of file Core.cpp.

References llvm::unwrap().

◆ LLVMSetModuleDataLayout()

LLVM_C_ABI void LLVMSetModuleDataLayout ( LLVMModuleRef M,
LLVMTargetDataRef DL )

Set the data layout for a module.

See also
Module::setDataLayout()

Definition at line 4806 of file Core.cpp.

References DL, and llvm::unwrap().

◆ LLVMSizeOfTypeInBits()

LLVM_C_ABI unsigned long long LLVMSizeOfTypeInBits ( LLVMTargetDataRef TD,
LLVMTypeRef Ty )

Computes the size of a type in bits for a target.

See the method llvm::DataLayout::getTypeSizeInBits.

Definition at line 4851 of file Core.cpp.

References llvm::unwrap().

◆ LLVMStoreSizeOfType()

LLVM_C_ABI unsigned long long LLVMStoreSizeOfType ( LLVMTargetDataRef TD,
LLVMTypeRef Ty )

Computes the storage size of a type in bytes for a target.

See the method llvm::DataLayout::getTypeStoreSize.

Definition at line 4855 of file Core.cpp.

References llvm::unwrap().