clang API Documentation
#include <CGRecordLayout.h>

Public Attributes | |
| unsigned | FieldIndex |
| Offset of the field to load in the LLVM structure, if any. | |
| CharUnits | FieldByteOffset |
| unsigned | FieldBitStart |
| unsigned | AccessWidth |
| Bit width of the memory access to perform. | |
| CharUnits | AccessAlignment |
| unsigned | TargetBitOffset |
| Offset for the target value. | |
| unsigned | TargetBitWidth |
| Number of bits in the access that are destined for the bit-field. | |
Descriptor for a single component of a bit-field access. The entire bit-field is constituted of a bitwise OR of all of the individual components.
Each component describes an accessed value, which is how the component should be transferred to/from memory, and a target placement, which is how that component fits into the constituted bit-field. The pseudo-IR for a load is:
%0 = gep base, 0, FieldIndex %1 = gep (i8*) %0, FieldByteOffset %2 = (i(AccessWidth) *) %1 %3 = load %2, align AccessAlignment %4 = shr %3, FieldBitStart
and the composed bit-field is formed as the boolean OR of all accesses, masked to TargetBitWidth bits and shifted to TargetBitOffset.
Definition at line 50 of file CGRecordLayout.h.
The alignment of the memory access, or 0 if the default alignment should be used.
Definition at line 73 of file CGRecordLayout.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), and clang::CodeGen::CGBitFieldInfo::print().
Bit width of the memory access to perform.
Definition at line 65 of file CGRecordLayout.h.
Referenced by clang::CodeGen::CGBitFieldInfo::CGBitFieldInfo(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), and clang::CodeGen::CGBitFieldInfo::print().
Bit offset in the accessed value to use. The width is implied by
Definition at line 62 of file CGRecordLayout.h.
Referenced by clang::CodeGen::CGBitFieldInfo::CGBitFieldInfo(), clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), and clang::CodeGen::CGBitFieldInfo::print().
Byte offset from the field address, if any. This should generally be unused as the cleanest IR comes from having a well-constructed LLVM type with proper GEP instructions, but sometimes its use is required, for example if an access is intended to straddle an LLVM field boundary.
Definition at line 58 of file CGRecordLayout.h.
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), and clang::CodeGen::CGBitFieldInfo::print().
Offset of the field to load in the LLVM structure, if any.
Definition at line 52 of file CGRecordLayout.h.
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), and clang::CodeGen::CGBitFieldInfo::print().
Offset for the target value.
Definition at line 76 of file CGRecordLayout.h.
Referenced by clang::CodeGen::CGBitFieldInfo::CGBitFieldInfo(), clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), and clang::CodeGen::CGBitFieldInfo::print().
Number of bits in the access that are destined for the bit-field.
Definition at line 79 of file CGRecordLayout.h.
Referenced by clang::CodeGen::CGBitFieldInfo::CGBitFieldInfo(), clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), and clang::CodeGen::CGBitFieldInfo::print().