Skip to content

Commit 6f139d7

Browse files
authored
Merge pull request #2975 from trentxintong/MISC
Limit inlining for stdlibunittest. This saves a lot of compilation time
2 parents 8643de9 + 6430525 commit 6f139d7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

stdlib/private/StdlibUnittest/StdlibUnittest.swift.gyb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,12 @@ public final class TestSuite {
11781178
PersistentState.complainIfNothingRuns()
11791179
}
11801180

1181+
// This method is prohibited from inlining because inlining the test harness
1182+
// into the test is not interesting from the runtime performance perspective.
1183+
// And it does not really make the test cases more effectively at testing the
1184+
// optimizer from a correctness prospective. On the contrary, it sometimes
1185+
// severely affects the compile time of the test code.
1186+
@inline(never)
11811187
public func test(
11821188
_ name: String,
11831189
file: String = #file, line: UInt = #line,
@@ -1187,6 +1193,12 @@ public final class TestSuite {
11871193
.code(testFunction)
11881194
}
11891195

1196+
// This method is prohibited from inlining because inlining the test harness
1197+
// into the test is not interesting from the runtime performance perspective.
1198+
// And it does not really make the test cases more effectively at testing the
1199+
// optimizer from a correctness prospective. On the contrary, it sometimes
1200+
// severely affects the compile time of the test code.
1201+
@inline(never)
11901202
public func test(
11911203
_ name: String, file: String = #file, line: UInt = #line
11921204
) -> _TestBuilder {

0 commit comments

Comments
 (0)