struct OptimizedStructLayoutField

Declaration

struct OptimizedStructLayoutField { /* full declaration omitted */ };

Description

A field in a structure.

Declared at: llvm/include/llvm/Support/OptimizedStructLayout.h:45

Member Variables

public uint64_t Offset
The offset of this field in the final layout. If this is initialized to FlexibleOffset, layout will overwrite it with the assigned offset of the field.
public uint64_t Size
The required size of this field in bytes. Does not have to be a multiple of Alignment. Must be non-zero.
public const void* Id
A opaque value which uniquely identifies this field.
public void* Scratch
Private scratch space for the algorithm. The implementation must treat this as uninitialized memory on entry.
public llvm::Align Alignment
The required alignment of this field.
public static const uint64_t FlexibleOffset = ~(unsigned long)0
A special value for Offset indicating that the field can be moved anywhere.

Method Overview

Methods

OptimizedStructLayoutField(
    const void* Id,
    uint64_t Size,
    llvm::Align Alignment,
    uint64_t FixedOffset = FlexibleOffset)

Declared at: llvm/include/llvm/Support/OptimizedStructLayout.h:50

Parameters

const void* Id
uint64_t Size
llvm::Align Alignment
uint64_t FixedOffset = FlexibleOffset

uint64_t getEndOffset() const

Description

Given that this field has a fixed offset, return the offset of the first byte following it.

Declared at: llvm/include/llvm/Support/OptimizedStructLayout.h:83

bool hasFixedOffset() const

Description

Return true if this field has been assigned a fixed offset. After layout, this will be true of all the fields.

Declared at: llvm/include/llvm/Support/OptimizedStructLayout.h:77