projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b237354
)
[LV] Use std::make_optional to fix build failure after 082a0046.
author
Florian Hahn
<flo@fhahn.com>
Tue, 11 Apr 2023 16:51:10 +0000
(17:51 +0100)
committer
Florian Hahn
<flo@fhahn.com>
Tue, 11 Apr 2023 16:56:15 +0000
(17:56 +0100)
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
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index
0081478
..
8915dd2
100644
(file)
--- a/
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@
-9103,7
+9103,7
@@
std::optional<VPlanPtr> 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) {