From: Christian Sigg Date: Thu, 29 Dec 2022 11:02:58 +0000 (+0100) Subject: [mlir] NFC: work around gcc-aarch64 v8.3 compilation issue in getRegionBranchSuccesso... X-Git-Tag: upstream/17.0.6~22493 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=947d529e4194e0567cfbbea99127066f76c87269;p=platform%2Fupstream%2Fllvm.git [mlir] NFC: work around gcc-aarch64 v8.3 compilation issue in getRegionBranchSuccessorOperands implementation. https://reviews.llvm.org/rG25671db3d343 didn't quite do it because the underlying issue was that the specific compiler chokes on the second standard conversion sequence after the user-defined `MutableOperandRange::operator OperandRange() const` conversion (see https://en.cppreference.com/w/cpp/language/implicit_conversion). --- diff --git a/mlir/lib/Interfaces/ControlFlowInterfaces.cpp b/mlir/lib/Interfaces/ControlFlowInterfaces.cpp index 9df5e55..deec605 100644 --- a/mlir/lib/Interfaces/ControlFlowInterfaces.cpp +++ b/mlir/lib/Interfaces/ControlFlowInterfaces.cpp @@ -395,6 +395,6 @@ mlir::getRegionBranchSuccessorOperands(Operation *operation, std::optional regionIndex) { auto range = getMutableRegionBranchSuccessorOperands(operation, regionIndex); if (range) - return static_cast(*range); + return range->operator OperandRange(); return std::nullopt; }