Skip to content

Conversation

charles-zablit
Copy link
Contributor

@charles-zablit charles-zablit commented Sep 11, 2025

This patch splits up the basic.swift test into 3 files:

  • basic.swift for macOS/linux basic testing: checking if we respect -gnone or not.
  • basic_windows.swift for windows basic testing: do we always emit basic debug information, even with gnone (Since [CodeGen][COFF] Always emit CodeView compiler info on Windows targets llvm/llvm-project#142970 we are always emitting minimal debug information on Windows. This broke DebugInfo/basic.swift.)
  • advanced.swift for all platforms, checking if we are emitting more advanced debug information correctly.

basic.swift and advanced.swift only contain NFC changes, as this change only splits them into 2 files.

@charles-zablit charles-zablit self-assigned this Sep 11, 2025
@charles-zablit charles-zablit added the Windows Platform: Windows label Sep 11, 2025
Copy link
Contributor

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for figuring out the root cause!

// NDEBUG-NOT: DICompileUnit
// NDEBUG-NOT: DIModule
// NDEBUG-NOT: DISubroutineType
// NDEBUG-NOT: DILocalVariable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think we need to be both more precise in the test expectations and in documenting them.

Can you make sure that the test

  • expects precisely 2 (non-skeleton) DICompileUnits when the target is windows
  • expects 0 DICompileUnit when the target is Darwin/linux/...
  • documents why Windows is expected to have a DICompileUnit at -gnone ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-skeleton == no dwoId

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to implement such tests. I have updated the description of the PR. The check only tests for exactly 1 (non-skeleton) DICompileUnit when targeting Windows, not 2.

@charles-zablit charles-zablit force-pushed the charles-zablit/windows/fix-debuginfo-basic-test-failures branch from 09e6548 to 68b3b53 Compare September 29, 2025 18:00
@charles-zablit charles-zablit changed the title [windows] allow minimal debug information in the DebugInfo/basic.swift test [windows] create a Windows specific Debug/basic.swift test Sep 29, 2025
@charles-zablit charles-zablit merged commit 7c32e00 into swiftlang:rebranch Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows Platform: Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants