File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -580,6 +580,8 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
580
580
// Leave <compiler-generated> & friends as is, without directory.
581
581
if (!(File.startswith (" <" ) && File.endswith (" >" )))
582
582
Dir = CurDir;
583
+ else
584
+ Dir = llvm::sys::path::root_directory (CurDir);
583
585
}
584
586
llvm::DIFile *F =
585
587
DBuilder.createFile (DebugPrefixMap.remapPath (File),
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ struct CrashWithThunk {
35
35
// CHECK: Thread 0 {{(".*" )?}}crashed:
36
36
37
37
// CHECK: 0 0x{{[0-9a-f]+}} crash() + {{[0-9]+}} in CrashWithThunk at {{.*}}/CrashWithThunk.swift:21:15
38
- // CHECK-NEXT: 1 [ra] [thunk] 0x{{[0-9a-f]+}} thunk for @escaping @callee_guaranteed () -> () + {{[0-9]+}} in CrashWithThunk at {{.*}}/Backtracing/ <compiler-generated>
38
+ // CHECK-NEXT: 1 [ra] [thunk] 0x{{[0-9a-f]+}} thunk for @escaping @callee_guaranteed () -> () + {{[0-9]+}} in CrashWithThunk at {{.*}}/<compiler-generated>
39
39
// CHECK-NEXT: 2 [ra] 0x{{[0-9a-f]+}} static CrashWithThunk.main() + {{[0-9]+}} in CrashWithThunk at {{.*}}/CrashWithThunk.swift:29:9
40
40
// CHECK-NEXT: 3 [ra] [system] 0x{{[0-9a-f]+}} static CrashWithThunk.$main() + {{[0-9]+}} in CrashWithThunk at {{.*}}/<compiler-generated>
41
41
// CHECK-NEXT: 4 [ra] 0x{{[0-9a-f]+}} main + {{[0-9]+}} in CrashWithThunk at {{.*}}/CrashWithThunk.swift
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ let i = foo.foo(-, x: y)
16
16
// CHECK: define {{.*}}@"$ss5Int64VABIyByd_A2BIegyd_TR"
17
17
// CHECK-NOT: ret
18
18
// CHECK: call {{.*}}, !dbg ![[LOC:.*]]
19
- // CHECK: ![[FILE:[0-9]+]] = !DIFile(filename: "<compiler-generated>", directory: "")
19
+ // CHECK: ![[FILE:[0-9]+]] = !DIFile(filename: "<compiler-generated>", directory: "/ ")
20
20
// CHECK: ![[THUNK:.*]] = distinct !DISubprogram(linkageName: "$ss5Int64VABIyByd_A2BIegyd_TR"
21
21
// CHECK-SAME: file: ![[FILE]]
22
22
// CHECK-NOT: line:
You can’t perform that action at this time.
0 commit comments