Frontend: Inherit compiler debugging options during module interface actions.

When building a module interface for the -typecheck-module-from-interface or
-compile-module-from-interface actions, inherit and honor compiler debugging
options and emit debugging output at the end of the interface build.
This commit is contained in:
Allan Shortlidge
2025-08-12 09:36:37 -07:00
parent 901e8becb2
commit 5d3d93478a
9 changed files with 99 additions and 49 deletions

View File

@@ -0,0 +1,10 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-emit-module-interface(%t/Test.swiftinterface) %s -module-name Test
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface) -module-name Test -dump-availability-scopes 2>&1 | %FileCheck --strict-whitespace %s
// RUN: %target-swift-frontend -compile-module-from-interface %t/Test.swiftinterface -o /dev/null -module-name Test -dump-availability-scopes 2>&1 | %FileCheck --strict-whitespace %s
// CHECK: {{^}}(root {{.*}} file={{.*}}{{/|\\}}availability-scopes.swift.tmp{{/|\\}}Test.swiftinterface
// CHECK: {{^}} (decl {{.*}}unavailable=* decl=unavailable()
@available(*, unavailable)
public func unavailable() { }