- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathfile_compilation_dir.swift
20 lines (18 loc) · 878 Bytes
/
file_compilation_dir.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// UNSUPPORTED: OS=windows-msvc
// RUN: %target-swiftc_driver -g \
// RUN: -c -file-compilation-dir /path/to \
// RUN: %s -o - -emit-ir | %FileCheck --check-prefix=CHECK-ABS %s
// RUN: %empty-directory(%t)
// RUN: mkdir -p %t
// RUN: cd %t
// RUN: cp %s .
// RUN: %target-swiftc_driver -g \
// RUN: -c -file-compilation-dir /path/to \
// RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL %s
// RUN: %target-swiftc_driver -g \
// RUN: -c -file-compilation-dir . \
// RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL-CWD %s
func foo(){}
// CHECK-ABS: !DIFile(filename: "{{.*}}/file_compilation_dir.swift", directory: "/path/to")
// CHECK-REL: !DIFile(filename: "file_compilation_dir.swift", directory: "/path/to")
// CHECK-REL-CWD: !DIFile(filename: "file_compilation_dir.swift", directory: ".")