mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #62567 from gottesmm/pr-aff949c3a3e3aaf7839d4462bd96b8eb60c06f97
[move-only-object] Teach move only object verifier how to emit proper errors for closure/defer uses
This commit is contained in:
@@ -952,3 +952,12 @@ SILGenBuilder::createMarkMustCheckInst(SILLocation loc, ManagedValue value,
|
||||
loc, value.forward(getSILGenFunction()), kind);
|
||||
return cloner.clone(mdi);
|
||||
}
|
||||
|
||||
ManagedValue SILGenBuilder::emitCopyValueOperation(SILLocation loc,
|
||||
ManagedValue value) {
|
||||
auto cvi = SILBuilder::emitCopyValueOperation(loc, value.getValue());
|
||||
// Trivial type.
|
||||
if (cvi == value.getValue())
|
||||
return value;
|
||||
return SGF.emitManagedRValueWithCleanup(cvi);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user