File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,10 @@ FileUnit *SerializedModuleLoader::loadAST(
200
200
isFramework, loadedModuleFile,
201
201
&extendedInfo);
202
202
if (loadInfo.status == serialization::Status::Valid) {
203
- M.setResilienceStrategy (extendedInfo.getResilienceStrategy ());
203
+ // In LLDB always use the default resilience strategy, so IRGen can query
204
+ // the size of resilient types.
205
+ if (!Ctx.LangOpts .DebuggerSupport )
206
+ M.setResilienceStrategy (extendedInfo.getResilienceStrategy ());
204
207
205
208
// We've loaded the file. Now try to bring it into the AST.
206
209
auto fileUnit = new (Ctx) SerializedASTFile (M, *loadedModuleFile,
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
+ //
3
+ // Compile the external swift module.
2
4
// RUN: %target-swift-frontend -g -emit-module -enable-resilience \
3
5
// RUN: -emit-module-path=%t/resilient_struct.swiftmodule \
4
6
// RUN: -module-name=resilient_struct %S/../Inputs/resilient_struct.swift
5
- // RUN: %target-swift-frontend -g -I %t -emit-ir -enable-resilience %s \
6
- // RUN: | %FileCheck %s
7
+ //
8
+ // RUN: %target-swift-frontend -g -I %t -emit-ir -enable-resilience %s -o - \
9
+ // RUN: | %FileCheck %s
10
+ //
11
+ // RUN: %target-swift-frontend -g -I %t -emit-sil -enable-resilience %s -o - \
12
+ // RUN: | %FileCheck %s --check-prefix=CHECK-SIL
13
+ // RUN: %target-swift-frontend -g -I %t -emit-sil -enable-resilience %s -o - \
14
+ // RUN: -debugger-support | %FileCheck %s --check-prefix=CHECK-LLDB
7
15
import resilient_struct
8
16
9
17
func use< T> ( _ t: T ) { }
@@ -23,3 +31,9 @@ public func f() {
23
31
// FIXME-NOT: size:
24
32
// CHECK: =
25
33
}
34
+
35
+ // CHECK-SIL: // f()
36
+ // CHECK-LLDB: // f()
37
+ // CHECK-SIL: %0 = alloc_stack $Size, let, name "s1"
38
+ // CHECK-LLDB: %0 = metatype $@thin Size.Type
39
+ // CHECK-LLDB: debug_value %{{.*}} : $Size, let, name "s1"
You can’t perform that action at this time.
0 commit comments