summaryrefslogtreecommitdiff
path: root/mlir/lib/Interfaces
diff options
context:
space:
mode:
authorChristian Sigg <csigg@google.com>2022-12-28 12:08:37 +0100
committerChristian Sigg <csigg@google.com>2022-12-28 12:23:37 +0100
commit25671db3d3432618425b67c701e7d8b65bec68f9 (patch)
treed69c478c7970bfeefac6330843b39dbda6259365 /mlir/lib/Interfaces
parent48655f72f9c09a6164109bff3197e07a3f3d8a52 (diff)
downloadllvm-25671db3d3432618425b67c701e7d8b65bec68f9.tar.gz
[mlir] NFC: work around gcc-aarch64 v8.3 compilation issue in getRegionBranchSuccessorOperands implementation.
Diffstat (limited to 'mlir/lib/Interfaces')
-rw-r--r--mlir/lib/Interfaces/ControlFlowInterfaces.cpp4
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;
}