Skip to content

Commit 57105f4

Browse files
committed
Remove unstable irgen diagnostic swift test, add a sil test instead
1 parent 695a3b5 commit 57105f4

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %target-swift-frontend %s -emit-ir -o /dev/null -verify
2+
import Builtin
3+
4+
sil @stack_alloc_builtin: $@convention(thin) () -> () {
5+
bb0:
6+
%0 = integer_literal $Builtin.Word, -1
7+
%1 = integer_literal $Builtin.Word, 8
8+
%2 = builtin "stackAlloc"(%0 : $Builtin.Word, %1 : $Builtin.Word, %1 : $Builtin.Word) : $Builtin.RawPointer // expected-error{{allocation capacity must be greater than or equal to zero}}
9+
%3 = builtin "stackDealloc"(%2 : $Builtin.RawPointer) : $()
10+
%r = tuple ()
11+
return %r : $()
12+
}

test/IRGen/temporary_allocation/negative_size.swift

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)