[mlir] Don't return nullptrs from scf::IfOp::getSuccessorRegions
authorTres Popp <tpopp@google.com>
Tue, 16 Feb 2021 10:31:41 +0000 (11:31 +0100)
committerTres Popp <tpopp@google.com>
Tue, 16 Feb 2021 11:06:30 +0000 (12:06 +0100)
commit787d771dce71af03bc23527ca95fcb858934ae7a
tree9fa71bcb10f78d89b1411a733ccb420341901a05
parentc96fee98dbff50356f5cc92724e1fcfec2865c42
[mlir] Don't return nullptrs from scf::IfOp::getSuccessorRegions

Previously this might happen if there was no elseRegion and the method
was asked for all successor regions.

Differential Revision: https://reviews.llvm.org/D96764
mlir/lib/Dialect/SCF/SCF.cpp