File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
validation-test/SILOptimizer Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %gyb %s > %t/main.swift
3
+
4
+ // The compiler should finish in less than 1 minute. To give some slack,
5
+ // specify a timeout of 5 minutes.
6
+ // If the compiler needs more than 5 minutes, there is probably a real problem.
7
+ // So please don't just increase the timeout in case this fails.
8
+
9
+ // RUN: %{python} %S/../../test/Inputs/timeout.py 300 %target-swift-frontend -O -parse-as-library -sil-verify-none -emit-sil %t/main.swift | %FileCheck %s
10
+
11
+ // REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
12
+ // REQUIRES: long_test
13
+
14
+ // Check if the optimizer can optimize the whole array into a statically
15
+ // initialized global
16
+
17
+ // CHECK: sil_global private @globalinit_{{.*}} : $_ContiguousArrayStorage<String> = {
18
+ // CHECK: %initval = object $_ContiguousArrayStorage<String>
19
+
20
+ public let str_array: [String] = [
21
+
22
+ % for i in range(63500):
23
+ "string in array with index ${i}",
24
+ % end
25
+
26
+ ]
27
+
You can’t perform that action at this time.
0 commit comments