mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
18 lines
641 B
Swift
18 lines
641 B
Swift
// A basic test for debug info.
|
|
// REQUIRES: OS=windows-msvc
|
|
// --------------------------------------------------------------------
|
|
// Verify that, by default, we exactly emit 1 DICompileUnit entry without dwoId.
|
|
// On Windows, we always emit minimal DebugInfo to match MSVC's behavior:
|
|
// See https://github.com/llvm/llvm-project/pull/142970 for more details.
|
|
// RUN: %target-swift-frontend %s -emit-ir -o - \
|
|
// RUN: | %FileCheck %s --check-prefix NDEBUG
|
|
// NDEBUG: source_filename
|
|
// NDEBUG: !DICompileUnit(
|
|
// NDEBUG-NOT: dwoId:
|
|
// NDEBUG-SAME: )
|
|
// NDEBUG-NOT: !DICompileUnit(
|
|
public func foo() -> Int {
|
|
let bar = 1
|
|
return bar
|
|
}
|