mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This flag is based on Clang's -fdebug-prefix-map, which lets the user remap absolute paths in debug info. This is necessary for reproducible builds and allows debugging to work on a different machine than the one that built the code when paths to the source may be different.
8 lines
205 B
Swift
8 lines
205 B
Swift
// RUN: %swiftc_driver -g -debug-prefix-map %S=/var/empty %s -emit-ir -o - | %FileCheck %s
|
|
|
|
func square(_ n: Int) -> Int {
|
|
return n * n
|
|
}
|
|
|
|
// CHECK: !DIFile(filename: "/var/empty/debug_prefix_map.swift"
|