mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
BitcodeReader: parse blockinfo inside block
Call start/endBlock before/after `parseBlockInfoBlock` in order to not use the current block context, which is wrong and leads to e.g. incorrect abbrevlen being used.
This commit is contained in:
parent
ae518dcb41
commit
9649ff37ef
1 changed files with 5 additions and 1 deletions
|
|
@ -154,7 +154,11 @@ pub fn next(bc: *BitcodeReader) !?Item {
|
|||
Abbrev.Builtin.enter_subblock.toRecordId() => {
|
||||
const block_id: u32 = @intCast(record.operands[0]);
|
||||
switch (block_id) {
|
||||
Block.block_info => try bc.parseBlockInfoBlock(),
|
||||
Block.block_info => {
|
||||
try bc.startBlock(Block.block_info, @intCast(record.operands[1]));
|
||||
try bc.parseBlockInfoBlock();
|
||||
try bc.endBlock();
|
||||
},
|
||||
Block.first_reserved...Block.last_standard => return error.UnsupportedBlockId,
|
||||
else => {
|
||||
try bc.startBlock(block_id, @intCast(record.operands[1]));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue