mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
12f8d9c6c9
Default to use new swift-driver to run lit tests as legacy swift driver is deprecated for a long time. The lit tests for legacy drivers are also disable when running new swift-driver. Tests that relies on legacy swift driver (for example, tests merge module) can be enabled on conditions `legacy_swift_driver`. Fix and split up some existing tests that relies on legacy driver.
16 lines
595 B
Swift
16 lines
595 B
Swift
/// New swift-driver canonicalize path
|
|
// UNSUPPORTED: OS=windows-msvc && !legacy_swift_driver
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module-path %t/Globals.swiftmodule %S/Globals.swift
|
|
// RUN: %target-swiftc_driver -g -debug-prefix-map %/S=/var/empty -debug-prefix-map %t=/var/empty %/s -I %t -emit-ir -o - | %FileCheck %s
|
|
|
|
import Globals
|
|
|
|
func square(_ n: Int) -> Int {
|
|
return n * n
|
|
}
|
|
|
|
// CHECK: !DIFile(filename: "/var/empty/debug_prefix_map.swift"
|
|
// CHECK: !DIModule(scope: null, name: "Globals", {{.*}}includePath: "/var/empty{{(/|\\\\)}}Globals.swiftmodule"
|