Skip to content

Commit 34d5efc

Browse files
committed
WIP
1 parent c22e046 commit 34d5efc

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

lib/AST/Decl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8984,6 +8984,10 @@ bool IsFunctionBodySkippedRequest::evaluate(
89848984
// typecheck them.
89858985
if (AD->hasForcedStaticDispatch())
89868986
return false;
8987+
8988+
// ALLANXXX
8989+
// if (AD->isSynthesized())
8990+
// return false;
89878991
}
89888992

89898993
// Actor initializers need to be checked to determine delegation status.

test/SILGen/skip-function-bodies-clang-enum-init-raw-value.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
// CHECK-SKIP-ALL-NOT: sSo7YesOrNoV8rawValueABSgs6UInt32V_tcfC
1818

19-
// CHECK: sil shared [serialized]{{.*}} @$sSo7YesOrNoV8rawValueABSgs6UInt32V_tcfC : $@convention(method) (UInt32, @thin YesOrNo.Type) -> Optional<YesOrNo> {
19+
// CHECK: sil shared [serialized]{{.*}} @$sSo7YesOrNoV8rawValueABSgs6UInt32V_tcfC : $@convention(method) ({{.*}}, @thin YesOrNo.Type) -> Optional<YesOrNo> {
2020
// CHECK: return {{%.*}} : $Optional<YesOrNo>
2121
// CHECK: } // end sil function '$sSo7YesOrNoV8rawValueABSgs6UInt32V_tcfC'
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -emit-silgen %s -experimental-skip-non-inlinable-function-bodies | %FileCheck %s
3+
// RUN: %target-swift-frontend -emit-silgen %s -experimental-skip-non-inlinable-function-bodies-without-types | %FileCheck %s
4+
// RUN: %target-swift-frontend -emit-silgen %s -experimental-skip-all-function-bodies | %FileCheck %s --check-prefix=CHECK-SKIP-ALL
5+
6+
// CHECK: sil
7+
8+
// CHECK-SKIP-ALL-NOT: ALLANXXX
9+
10+
public struct S {
11+
public lazy var x: Int = generateNumber()
12+
13+
func generateNumber() -> Int {
14+
return 1
15+
}
16+
}

0 commit comments

Comments
 (0)