Files
swift-mirror/test/DebugInfo/compileunit-sysroot-sdk.swift
Adrian Prantl 56309f6b49 Debug Info: Store the SDK in the DICompileUnit.
This an intermediate step for PR44213
(https://bugs.llvm.org/show_bug.cgi?id=44213).

This stores the SDK *name* in the debug info, to make it possible to
`-fdebug-prefix-map`-replace the sysroot with a recognizable string and allowing
the debugger to find a fitting SDK relative to itself, not the machine the
executable was compiled on.

rdar://problem/51645582
2020-03-13 13:25:39 -07:00

6 lines
305 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - \
// RUN: -sdk /SWIFT_SYSROOT/MacOSX.sdk | %FileCheck %s
// Test that sysroot and SDK are stored in the debug info.
// CHECK: distinct !DICompileUnit({{.*}}sysroot: "/SWIFT_SYSROOT/MacOSX.sdk",
// LLDB-SAME: sdk: "MacOSX.sdk"