We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc56f8e commit 9478d34Copy full SHA for 9478d34
lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableValuesChecker.cpp
@@ -428,7 +428,9 @@ bool ConsumeOperatorCopyableValuesChecker::check() {
428
for (auto &block : *fn) {
429
for (auto &ii : block) {
430
if (auto *mvi = dyn_cast<MoveValueInst>(&ii)) {
431
- if (mvi->isFromVarDecl() && !mvi->getType().isMoveOnly()) {
+ if (mvi->isFromVarDecl()
432
+ && mvi->getOwnershipKind() != OwnershipKind::None
433
+ && !mvi->getType().isMoveOnly()) {
434
LLVM_DEBUG(llvm::dbgs()
435
<< "Found lexical lifetime to check: " << *mvi);
436
valuesToCheck.insert(mvi);
0 commit comments