mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Debug Info: Create artificial functions in a virtual file <compiler-generated>.
For the majority of artificial helper functions the filename is actively misleading since it usually represents the file of the caller that triggered the helper to be generated. Instead, this patch creates a virtual filname `<compiler-generated>` to make it very obvious that the function has not correspondence to any source code. <rdar://problem/33809560>
This commit is contained in:
@@ -70,7 +70,7 @@ func foo(_ a: Int64, _ b: Int64) -> Int64 {
|
||||
// CHECK-DAG: ![[FILE_CWD:[0-9]+]] = !DIFile(filename: "{{.*}}DebugInfo/basic.swift", directory: "{{.*}}")
|
||||
// CHECK-DAG: ![[MAINFILE:[0-9]+]] = !DIFile(filename: "basic.swift", directory: "{{.*}}DebugInfo")
|
||||
// CHECK-DAG: !DICompileUnit(language: DW_LANG_Swift, file: ![[FILE_CWD]],{{.*}} producer: "{{.*}}Swift version{{.*}},{{.*}} flags: "{{[^"]*}}-emit-ir
|
||||
// CHECK-DAG: !DISubprogram(name: "main"
|
||||
// CHECK-DAG: !DISubprogram(name: "main", {{.*}}file: ![[MAINFILE]],
|
||||
|
||||
// Function type for foo.
|
||||
// CHECK-DAG: ![[FOOTYPE]] = !DISubroutineType(types: ![[PARAMTYPES:[0-9]+]])
|
||||
|
||||
Reference in New Issue
Block a user