Expand description
A bounded reader of LLVM’s bitstream container: blocks, abbreviations (literal, fixed, VBR, array, char6, blob) and the BLOCKINFO block. It knows nothing of IR; it returns a tree of blocks and records. Every length is checked against the bits that remain before anything is allocated, and nesting, abbreviations and the total number of operands are capped, so a crafted file errors instead of exhausting memory.
Structs§
- Block
- A block: its id and what it holds.
- Record
- A record: its code, operands and, for blob abbreviations, the blob.
Enums§
- Element
- What a block holds, in order.
Functions§
- read
- Read a bitstream whose 32-bit magic has been checked: the top-level blocks (abbreviation width 2).