Do not assume Blocks belong to Functions
Fix Block::splitBlock and Block::eraseFromFunction that erronously assume blocks belong to functions. They now belong to regions. When splitting, new blocks should be created in the same region as the existing block. When erasing a block, it should be removed from the region rather than from the function body that transitively contains the region. Also rename Block::eraseFromFunction to Block::erase for consistency with other IR containers. -- PiperOrigin-RevId: 250278272
Loading
Please sign in to comment