@@ -39,41 +39,6 @@ using namespace Lowering;
39
39
void Initialization::_anchor () {}
40
40
void SILDebuggerClient::anchor () {}
41
41
42
- namespace {
43
- // / A "null" initialization that indicates that any value being initialized
44
- // / into this initialization should be discarded. This represents AnyPatterns
45
- // / (that is, 'var (_)') that bind to values without storing them.
46
- class BlackHoleInitialization : public Initialization {
47
- public:
48
- BlackHoleInitialization () {}
49
-
50
- bool canSplitIntoTupleElements () const override {
51
- return true ;
52
- }
53
-
54
- MutableArrayRef<InitializationPtr>
55
- splitIntoTupleElements (SILGenFunction &SGF, SILLocation loc,
56
- CanType type,
57
- SmallVectorImpl<InitializationPtr> &buf) override {
58
- // "Destructure" an ignored binding into multiple ignored bindings.
59
- for (auto fieldType : cast<TupleType>(type)->getElementTypes ()) {
60
- (void ) fieldType;
61
- buf.push_back (InitializationPtr (new BlackHoleInitialization ()));
62
- }
63
- return buf;
64
- }
65
-
66
- void copyOrInitValueInto (SILGenFunction &SGF, SILLocation loc,
67
- ManagedValue value, bool isInit) override {
68
- // / This just ignores the provided value.
69
- }
70
-
71
- void finishUninitialized (SILGenFunction &SGF) override {
72
- // do nothing
73
- }
74
- };
75
- } // end anonymous namespace
76
-
77
42
static void copyOrInitValueIntoHelper (
78
43
SILGenFunction &SGF, SILLocation loc, ManagedValue value, bool isInit,
79
44
ArrayRef<InitializationPtr> subInitializations,
0 commit comments