Skip to content

Commit 87aa339

Browse files
authored
Merge pull request #31579 from gribozavr/rm-dead-code
Remove dead code in SILGenProlog.cpp
2 parents 5036c95 + c6cf6cf commit 87aa339

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

lib/SILGen/SILGenProlog.cpp

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -34,49 +34,6 @@ SILValue SILGenFunction::emitSelfDecl(VarDecl *selfDecl) {
3434
return selfValue;
3535
}
3636

37-
namespace {
38-
39-
/// Cleanup that writes back to an inout argument on function exit.
40-
class CleanupWriteBackToInOut : public Cleanup {
41-
VarDecl *var;
42-
SILValue inoutAddr;
43-
44-
public:
45-
CleanupWriteBackToInOut(VarDecl *var, SILValue inoutAddr)
46-
: var(var), inoutAddr(inoutAddr) {}
47-
48-
void emit(SILGenFunction &SGF, CleanupLocation l,
49-
ForUnwind_t forUnwind) override {
50-
// Assign from the local variable to the inout address with an
51-
// 'autogenerated' copyaddr.
52-
l.markAutoGenerated();
53-
SGF.B.createCopyAddr(l, SGF.VarLocs[var].value, inoutAddr,
54-
IsNotTake, IsNotInitialization);
55-
}
56-
};
57-
} // end anonymous namespace
58-
59-
60-
namespace {
61-
class StrongReleaseCleanup : public Cleanup {
62-
SILValue box;
63-
public:
64-
StrongReleaseCleanup(SILValue box) : box(box) {}
65-
void emit(SILGenFunction &SGF, CleanupLocation l,
66-
ForUnwind_t forUnwind) override {
67-
SGF.B.emitDestroyValueOperation(l, box);
68-
}
69-
70-
void dump(SILGenFunction &) const override {
71-
#ifndef NDEBUG
72-
llvm::errs() << "DeallocateValueBuffer\n"
73-
<< "State: " << getState() << "box: " << box << "\n";
74-
#endif
75-
}
76-
};
77-
} // end anonymous namespace
78-
79-
8037
namespace {
8138
class EmitBBArguments : public CanTypeVisitor<EmitBBArguments,
8239
/*RetTy*/ ManagedValue>

0 commit comments

Comments
 (0)