pub const BlockId = enum(u5) Block IDs 1-7 are reserved for future expansion.
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73pub const BlockId = enum(u5) {
/// BLOCKINFO_BLOCK is used to define metadata about blocks, for example,
/// standard abbrevs that should be available to all blocks of a specified
/// ID.
BLOCKINFO = 0,
/// Blocks
MODULE = FIRST_APPLICATION,
/// Module sub-block id's.
PARAMATTR,
PARAMATTR_GROUP,
CONSTANTS,
FUNCTION,
/// Block intended to contains information on the bitcode versioning.
/// Can be used to provide better error messages when we fail to parse a
/// bitcode file.
IDENTIFICATION,
VALUE_SYMTAB,
METADATA,
METADATA_ATTACHMENT,
TYPE,
USELIST,
MODULE_STRTAB,
GLOBALVAL_SUMMARY,
OPERAND_BUNDLE_TAGS,
METADATA_KIND,
STRTAB,
FULL_LTO_GLOBALVAL_SUMMARY,
SYMTAB,
SYNC_SCOPE_NAMES,
/// Block IDs 1-7 are reserved for future expansion.
pub const FIRST_APPLICATION = 8;
}
All bitcode files can optionally include a BLOCKINFO block, which contains metadata about other blocks in the file. The only top-level block types are MODULE, IDENTIFICATION, STRTAB and SYMTAB.