Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/DebugInfo/Imports.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module-path %t/basic.swiftmodule %S/basic.swift
// RUN: %target-swift-frontend -emit-module-path %t/advanced.swiftmodule %S/advanced.swift

// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - | %FileCheck %s
// RUN: %target-swift-frontend -c -module-name Foo %s -I %t -g -o %t.o
Expand All @@ -10,13 +10,13 @@
// CHECK-DAG: ![[THISFILE]] = !DIFile(filename: "{{.*}}test{{/|\\\\}}DebugInfo{{/|\\\\}}Imports.swift",
// CHECK-DAG: ![[SWIFTMODULE:[0-9]+]] = !DIModule({{.*}}, name: "Swift"
// CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, scope: ![[THISFILE]], entity: ![[SWIFTMODULE]]
// CHECK-DAG: ![[BASICMODULE:[0-9]+]] = !DIModule({{.*}}, name: "basic"
// CHECK-DAG: ![[BASICMODULE:[0-9]+]] = !DIModule({{.*}}, name: "advanced"
// CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, scope: ![[THISFILE]], entity: ![[BASICMODULE]]
import basic
import advanced
import typealias Swift.Optional

func markUsed<T>(_ t: T) {}
markUsed(basic.foo(1, 2))
markUsed(advanced.foo(1, 2))

// DWARF: .debug_info
// DWARF: DW_TAG_module
Expand All @@ -26,7 +26,7 @@ markUsed(basic.foo(1, 2))
// DWARF: DW_AT_name ("Swift")
// DWARF: DW_AT_LLVM_include_path
// DWARF: DW_TAG_module
// DWARF: DW_AT_name ("basic")
// DWARF: DW_AT_name ("advanced")

// DWARF-NOT: "Swift.Optional"

Expand Down
16 changes: 8 additions & 8 deletions test/DebugInfo/ParseableInterfaceImports.swift
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend-typecheck %S/basic.swift \
// RUN: -emit-module-interface-path %t/basic.swiftinterface
// RUN: %target-swift-frontend-typecheck %S/advanced.swift \
// RUN: -emit-module-interface-path %t/advanced.swiftinterface
// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - \
// RUN: | %FileCheck %s
// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - \
// RUN: -sdk %t | %FileCheck %s --check-prefix=SDK

import basic
import advanced

// CHECK: !DIModule(scope: null, name: "basic",
// CHECK: !DIModule(scope: null, name: "advanced",
// CHECK-SAME: includePath: "
// CHECK-SAME: basic.swiftinterface"
// CHECK-SAME: advanced.swiftinterface"

// Even if the module interface is in the SDK, we still return the path
// to the swiftinterface.
// SDK: !DIModule(scope: null, name: "basic",
// SDK: !DIModule(scope: null, name: "advanced",
// SDK-SAME: includePath: "
// SDK-SAME: basic{{.*}}.swiftinterface"
// SDK-SAME: advanced{{.*}}.swiftinterface"

func markUsed<T>(_ t: T) {}
markUsed(basic.foo(1, 2))
markUsed(advanced.foo(1, 2))