Skip to content

Commit cbf1ab2

Browse files
committed
SIL: Remove an assertion
To support closures that capture the dynamic Self type, we need to add a new hidden parameter which does not have a VarDecl.
1 parent c870052 commit cbf1ab2

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/SIL/SILArgument.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ using namespace swift;
2626
SILArgument::SILArgument(SILBasicBlock *ParentBB, SILType Ty,
2727
const ValueDecl *D)
2828
: ValueBase(ValueKind::SILArgument, Ty), ParentBB(ParentBB), Decl(D) {
29-
// Function arguments need to have a decl.
30-
assert(
31-
!ParentBB->getParent()->isBare() &&
32-
ParentBB->getParent()->size() == 1
33-
? D != nullptr
34-
: true);
3529
ParentBB->insertArgument(ParentBB->bbarg_end(), this);
3630
}
3731

0 commit comments

Comments
 (0)