diff options
Diffstat (limited to 'mlir/lib')
-rw-r--r-- | mlir/lib/Interfaces/ControlFlowInterfaces.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mlir/lib/Interfaces/ControlFlowInterfaces.cpp b/mlir/lib/Interfaces/ControlFlowInterfaces.cpp index 65006f3569fc..9df5e551e6a3 100644 --- a/mlir/lib/Interfaces/ControlFlowInterfaces.cpp +++ b/mlir/lib/Interfaces/ControlFlowInterfaces.cpp @@ -394,5 +394,7 @@ std::optional<OperandRange> mlir::getRegionBranchSuccessorOperands(Operation *operation, std::optional<unsigned> regionIndex) { auto range = getMutableRegionBranchSuccessorOperands(operation, regionIndex); - return range ? std::optional<OperandRange>(*range) : std::nullopt; + if (range) + return static_cast<OperandRange>(*range); + return std::nullopt; } |