Skip to content

Commit 9fafa1c

Browse files
committed
Make deserialized locations default to line 0, which tells the debugger
to ignore them, while still referencing the module file needed to perform type lookups, etc. <rdar://problem/17648201> After setting a breakpoint, the first step action is malfunctioning Swift SVN r20801
1 parent 867429b commit 9fafa1c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Location getDeserializedLoc(Decl* D) {
231231
const DeclContext *DC = D->getDeclContext()->getModuleScopeContext();
232232
if (const char *Filename = getFilenameFromDC(DC)) {
233233
L.Filename = Filename;
234-
L.Line = 1;
234+
L.Line = 0;
235235
}
236236
return L;
237237
}

test/DebugInfo/Imports.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// CHECK-DAG: ![[THISFILE]] = metadata {{.*}}[ DW_TAG_file_type ] [{{.*}}test/DebugInfo/Imports.swift]
88
// CHECK-DAG: ![[SWIFTFILE:[0-9]+]] = {{.*}}[ DW_TAG_file_type ]{{.*}}Swift.swiftmodule
99
// CHECK-DAG: ![[SWIFTMODULE:[0-9]+]] = {{.*}}[ DW_TAG_module ] [Swift]
10-
// CHECK-DAG: metadata ![[SWIFTFILE]], metadata ![[SWIFTMODULE]], i32 1} ; [ DW_TAG_imported_module ]
10+
// CHECK-DAG: metadata ![[SWIFTFILE]], metadata ![[SWIFTMODULE]], i32 0} ; [ DW_TAG_imported_module ]
1111
// CHECK-DAG: metadata ![[BASICFILE:[0-9]+]], metadata ![[BASICMODULE:[0-9]+]], i32 [[@LINE+3]]} ; [ DW_TAG_imported_module ]
1212
// CHECK-DAG: ![[BASICFILE]] = {{.*}}basic.swift
1313
// CHECK-DAG: ![[BASICMODULE]] = {{.*}}[ DW_TAG_module ] [basic]

test/DebugInfo/basic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func foo(var a: Int, var b: Int) -> Int {
6363

6464
// Import of the swift standard library.
6565
// CHECK-DAG: ![[SWIFTFILE:[0-9]+]] = {{.*}}DW_TAG_file_type{{.*}}Swift.swiftmodule
66-
// CHECK-DAG: metadata ![[SWIFTFILE]], metadata ![[SWIFTMODULE:[0-9]+]], i32 1} ; [ DW_TAG_imported_module ]
66+
// CHECK-DAG: metadata ![[SWIFTFILE]], metadata ![[SWIFTMODULE:[0-9]+]], i32 0} ; [ DW_TAG_imported_module ]
6767
// CHECK-DAG: ![[SWIFTMODULE]] = {{.*}}[ DW_TAG_module ] [Swift]
6868

6969
// Filenames

0 commit comments

Comments
 (0)