File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 24
24
25
25
namespace swift {
26
26
namespace Lowering {
27
- class SILGenFunction ;
28
27
28
+ class SILGenFunction ;
29
29
class Initialization ;
30
30
using InitializationPtr = std::unique_ptr<Initialization>;
31
+ class TemporaryInitialization ;
32
+ using TemporaryInitializationPtr = std::unique_ptr<TemporaryInitialization>;
31
33
32
34
// / An abstract class for consuming a value. This is used for initializing
33
35
// / variables, although that is not the only way it is used.
Original file line number Diff line number Diff line change @@ -372,6 +372,12 @@ class ConsumableManagedValue {
372
372
ConsumableManagedValue asBorrowedOperand () const {
373
373
return { asUnmanagedValue (), CastConsumptionKind::CopyOnSuccess };
374
374
}
375
+
376
+ // / Return a managed value that's appropriate for copying this value and
377
+ // / always consuming it.
378
+ ConsumableManagedValue copy (SILGenFunction &SGF, SILLocation loc) const {
379
+ return ConsumableManagedValue::forOwned (asUnmanagedValue ().copy (SGF, loc));
380
+ }
375
381
};
376
382
377
383
} // namespace Lowering
You can’t perform that action at this time.
0 commit comments