mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[windows] fix DebugInfo tests
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user