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> {
3919
3919
3920
3920
void visitYieldInst (YieldInst *yield) { userInstructionFallback (yield); }
3921
3921
3922
+ void visitThrowInst (ThrowInst *t) { userInstructionFallback (t); }
3923
+
3922
3924
void visitFixLifetimeInst (FixLifetimeInst *f) {
3923
3925
auto addr = assignment.getAddressForValue (f->getOperand ());
3924
3926
auto builder = assignment.getBuilder (f->getIterator ());
Original file line number Diff line number Diff line change @@ -351,3 +351,16 @@ bb0(%0 : $*X):
351
351
dealloc_stack %1 : $*Y
352
352
return %13 : $()
353
353
}
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