LLVM 20.0.0git
|
A field in a structure. More...
#include "llvm/Support/OptimizedStructLayout.h"
Public Member Functions | |
OptimizedStructLayoutField (const void *Id, uint64_t Size, Align Alignment, uint64_t FixedOffset=FlexibleOffset) | |
bool | hasFixedOffset () const |
Return true if this field has been assigned a fixed offset. | |
uint64_t | getEndOffset () const |
Given that this field has a fixed offset, return the offset of the first byte following it. | |
Public Attributes | |
uint64_t | Offset |
The offset of this field in the final layout. | |
uint64_t | Size |
The required size of this field in bytes. | |
const void * | Id |
A opaque value which uniquely identifies this field. | |
void * | Scratch |
Private scratch space for the algorithm. | |
Align | Alignment |
The required alignment of this field. | |
Static Public Attributes | |
static constexpr uint64_t | FlexibleOffset = ~(uint64_t)0 |
A special value for Offset indicating that the field can be moved anywhere. | |
A field in a structure.
Definition at line 45 of file OptimizedStructLayout.h.
|
inline |
Definition at line 50 of file OptimizedStructLayout.h.
|
inline |
Given that this field has a fixed offset, return the offset of the first byte following it.
Definition at line 83 of file OptimizedStructLayout.h.
References assert(), hasFixedOffset(), Offset, and Size.
Referenced by checkValidLayout(), and llvm::performOptimizedStructLayout().
|
inline |
Return true if this field has been assigned a fixed offset.
After layout, this will be true of all the fields.
Definition at line 77 of file OptimizedStructLayout.h.
References FlexibleOffset, and Offset.
Referenced by checkValidLayout(), getEndOffset(), and llvm::performOptimizedStructLayout().
Align llvm::OptimizedStructLayoutField::Alignment |
The required alignment of this field.
Definition at line 73 of file OptimizedStructLayout.h.
Referenced by checkValidLayout(), and llvm::performOptimizedStructLayout().
A special value for Offset indicating that the field can be moved anywhere.
Definition at line 48 of file OptimizedStructLayout.h.
Referenced by hasFixedOffset().
const void* llvm::OptimizedStructLayoutField::Id |
A opaque value which uniquely identifies this field.
Definition at line 66 of file OptimizedStructLayout.h.
uint64_t llvm::OptimizedStructLayoutField::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.
Definition at line 59 of file OptimizedStructLayout.h.
Referenced by checkValidLayout(), getEndOffset(), hasFixedOffset(), and llvm::performOptimizedStructLayout().
void* llvm::OptimizedStructLayoutField::Scratch |
Private scratch space for the algorithm.
The implementation must treat this as uninitialized memory on entry.
Definition at line 70 of file OptimizedStructLayout.h.
Referenced by llvm::performOptimizedStructLayout().
uint64_t llvm::OptimizedStructLayoutField::Size |
The required size of this field in bytes.
Does not have to be a multiple of Alignment. Must be non-zero.
Definition at line 63 of file OptimizedStructLayout.h.
Referenced by getEndOffset(), OptimizedStructLayoutField(), and llvm::performOptimizedStructLayout().