Use a dictionary to store named blocks.
This commit is contained in:
parent
a7b3db8c1d
commit
05782f6fca
|
@ -315,7 +315,8 @@ class LLVMParser(object):
|
|||
|
||||
def p_fbody_multiple_blocks(self, p):
|
||||
'fbody : block named_block_list'
|
||||
p[0] = ll.FunctionBody(p[1], p[2])
|
||||
named_blocks = {label: block for (label, block) in p[2]}
|
||||
p[0] = ll.FunctionBody(p[1], named_blocks)
|
||||
|
||||
def p_fbody_one_block(self, p):
|
||||
'fbody : block'
|
||||
|
|
Loading…
Reference in New Issue
Block a user