TPDE
|
Helper class to write function text. More...
#include <FunctionWriter.hpp>
Public Member Functions | |
SecRef | get_sec_ref () const noexcept |
Get the SecRef of the current section. | |
DataSection & | get_section () const noexcept |
Get the current section. | |
void | switch_section (DataSection &new_section) noexcept |
Switch section writer to new section; must be flushed. | |
Text Writing | |
size_t | offset () const noexcept |
Get the current offset into the section. | |
size_t | allocated_size () const noexcept |
Get the current allocated size of the section. | |
u8 * | begin_ptr () noexcept |
Pointer to beginning of section data. | |
u8 *& | cur_ptr () noexcept |
Labels | |
Label | label_create () noexcept |
Create a new unplaced label. | |
void | label_place (Label label, u32 off) noexcept |
Place unplaced label at the specified offset inside the section. | |
void | label_ref (Label label, u32 off, LabelFixupKind kind) noexcept |
Reference label at given offset inside the code section. | |
Public Attributes | |
util::SmallVector< u32 > | label_offsets |
Label offsets into section, ~0u indicates unplaced label. | |
Helper class to write function text.
Definition at line 29 of file FunctionWriter.hpp.
|
inlinenoexcept |
Modifiable pointer to current writing position of the section. Must not be moved beyond the allocated region.
Definition at line 109 of file FunctionWriter.hpp.