File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -3919,6 +3919,8 @@ class RewriteUser : SILInstructionVisitor<RewriteUser> {
39193919
39203920 void visitYieldInst (YieldInst *yield) { userInstructionFallback (yield); }
39213921
3922+ void visitThrowInst (ThrowInst *t) { userInstructionFallback (t); }
3923+
39223924 void visitFixLifetimeInst (FixLifetimeInst *f) {
39233925 auto addr = assignment.getAddressForValue (f->getOperand ());
39243926 auto builder = assignment.getBuilder (f->getIterator ());
Original file line number Diff line number Diff line change @@ -351,3 +351,16 @@ bb0(%0 : $*X):
351351 dealloc_stack %1 : $*Y
352352 return %13 : $()
353353}
354+
355+ // CHECK: sil @test14
356+ // CHECK: [[VAL:%.*]] = load {{.*}} : $*X
357+ // CHECK: throw [[VAL]]
358+ // CHECK: } // end sil function 'test14'
359+ sil @test14 : $@convention(thin) (@in X) -> @error X {
360+ bb0(%0 : $*X):
361+ %1 = alloc_stack $X
362+ copy_addr [take] %0 to [init] %1 : $*X
363+ %3 = load %1 : $*X
364+ dealloc_stack %1 : $*X
365+ throw %3 : $X
366+ }
You can’t perform that action at this time.
0 commit comments