mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Users may want to use -fdebug-prefix-map to remap a directory to "./". This wasn't supported previously and resulted in duplicate path prefixes in the debug info. With this patch swiftc behaves similar to clang when remapping a path to a relative path. rdar://83753143
14 lines
577 B
Swift
14 lines
577 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: mkdir -p %t/SubdirectoryWithAVeryUniqueName
|
|
// RUN: cd %t/SubdirectoryWithAVeryUniqueName
|
|
// RUN: cp %s .
|
|
// RUN: %target-swiftc_driver -g -debug-prefix-map %t=. \
|
|
// RUN: %t/SubdirectoryWithAVeryUniqueName/debug_prefix_map_abs_rel_subdir.swift \
|
|
// RUN: -emit-ir -o - | %FileCheck %s
|
|
|
|
public func f() {}
|
|
|
|
// CHECK-NOT: debug_prefix_map_abs_rel_subdir.swift
|
|
// CHECK: !DIFile(filename: "debug_prefix_map_abs_rel_subdir.swift", directory: ".{{/|\\\\}}SubdirectoryWithAVeryUniqueName")
|
|
// CHECK-NOT: debug_prefix_map_abs_rel_subdir.swift
|