mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This applies the same changes from Clang CFE r349065 to the Swift frontend to unify how filenames, cmpilation directories and absolute paths in filenames and path remappings are handled.
28 lines
1.1 KiB
Swift
28 lines
1.1 KiB
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend -emit-ir -parse-stdlib -module-name NotTheStdlib %s -I %t -g -o - > %t.ll
|
|
// RUN: %FileCheck %s < %t.ll
|
|
// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.ll
|
|
|
|
// RUN: %target-swift-frontend -c -parse-stdlib -module-name NotTheStdlib %s -I %t -g -o %t.o
|
|
// RUN: %llvm-dwarfdump -a %t.o > %t.dump
|
|
// RUN: %FileCheck -check-prefix=DWARF %s < %t.dump
|
|
// RUN: %FileCheck -check-prefix=NEGATIVE-DWARF %s < %t.dump
|
|
|
|
// CHECK-DAG: ![[MODULE:[0-9]+]] = !DIModule({{.*}}, name: "NotTheStdlib", includePath: "{{.*}}test{{.*}}DebugInfo{{.*}}"
|
|
// CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, scope: ![[THISFILE:[0-9]+]], entity: ![[MODULE]]
|
|
// CHECK-DAG: ![[THISFILE]] = !DIFile(filename: "{{.*}}test{{/|\\5C}}DebugInfo{{/|\\5C}}ImportsStdlib.swift"
|
|
|
|
// NEGATIVE-NOT: !DIFile(filename: "{{.*}}Swift.swiftmodule"
|
|
// NEGATIVE-NOT: !DIModule({{.*}}, name: "Swift"
|
|
|
|
// DWARF: .debug_info
|
|
// DWARF: DW_TAG_module
|
|
// DWARF: DW_AT_name ("NotTheStdlib")
|
|
// DWARF: DW_AT_LLVM_include_path
|
|
|
|
// DWARF: file_names{{.*}}
|
|
// DWARF-NEXT: "ImportsStdlib.swift"
|
|
|
|
// NEGATIVE-DWARF-NOT: DW_AT_name ("Swift")
|