// REQUIRES: asserts // RUN: %empty-directory(%t) // RUN: %empty-directory(%t/secret) // RUN: %target-swift-frontend -emit-module -o %t/secret %S/Inputs/struct_with_operators.swift // RUN: %empty-directory(%t/Frameworks/has_alias.framework/Modules/has_alias.swiftmodule) // RUN: %target-swift-frontend -emit-module -o %t/Frameworks/has_alias.framework/Modules/has_alias.swiftmodule/%target-swiftmodule-name %S/Inputs/alias.swift -module-name has_alias // RUN: cd %t/secret && %target-swiftc_driver -emit-module -o %t/has_xref.swiftmodule -I . -F ../Frameworks -parse-as-library %S/Inputs/has_xref.swift %S/../Inputs/empty.swift -Xfrontend -serialize-debugging-options -Xcc -ivfsoverlay -Xcc %S/../Inputs/unextended-module-overlay.yaml -Xcc -DDUMMY // RUN: %target-swift-frontend %s -typecheck -I %t // Ensure that in Swift 6 mode we do not read out search paths, thus are no longer able to // locate transitive dependencies with them // RUN: not %target-swift-frontend %s -typecheck -I %t -swift-version 6 &> %t/swift_6_output.txt // RUN: %FileCheck -check-prefix=SWIFT6 %s < %t/swift_6_output.txt // Check the actual serialized search paths. // RUN: llvm-bcanalyzer -dump %t/has_xref.swiftmodule > %t/has_xref.swiftmodule.txt // RUN: %FileCheck %s < %t/has_xref.swiftmodule.txt // RUN: %FileCheck -check-prefix=NEGATIVE %s < %t/has_xref.swiftmodule.txt import has_xref numeric(42) // CHECK-LABEL: blob data = '-working-directory' // CHECK: blob data = '{{.+}}{{/|\\}}secret' // CHECK: blob data = '-DDUMMY' // CHECK: // CHECK-LABEL: blob data = '{{.+}}{{/|\\}}secret{{/|\\}}../Frameworks' // CHECK: blob data = '{{.+}}{{/|\\}}secret{{/|\\}}.' // CHECK: // NEGATIVE-NOT: '.' // NEGATIVE-NOT: '../Frameworks' // This should be filtered out. // NEGATIVE-NOT: -ivfsoverlay{{.*}}unextended-module-overlay.yaml // SWIFT6: error: missing required modules: 'has_alias', 'struct_with_operators'