Skip to content
Commit d58ffaff authored by Alex Zinenko's avatar Alex Zinenko Committed by jpienaar
Browse files

Verify that the first block of a cfgfunc does not have predecessors.

This was left as a TODO in the code.  Note that the spec does not explicitly
prohibit the first basic block from having a predecessor, and may be worth
updating.

The error is reported at the location of the cfgfunc to which the basic block
belongs since the location information of the block label is not propagated
beyond the IR parser.  Arguably, pointing to a function that starts with an
ill-formed block is better than pointing to the first operation in that block
as it makes easier to follow the code down until the first block label.

PiperOrigin-RevId: 218343654
parent ccfe5937
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment