From 68afaa3f48854021cda1c7af725c1431da9308d9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Tue, 11 Apr 2023 17:51:10 +0100 Subject: [PATCH] [LV] Use std::make_optional to fix build failure after 082a0046. Some compilers require std::make_optional(std::move()) to force construction of the std::optional return value. This should fix the build failure in https://lab.llvm.org/buildbot#builders/67/builds/10991 --- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 0081478..8915dd2 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -9103,7 +9103,7 @@ std::optional LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes( VPlanTransforms::mergeBlocksIntoPredecessors(*Plan); assert(VPlanVerifier::verifyPlanIsValid(*Plan) && "VPlan is invalid"); - return Plan; + return std::make_optional(std::move(Plan)); } VPlanPtr LoopVectorizationPlanner::buildVPlan(VFRange &Range) { -- 2.7.4