mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This makes Swift (a) more likely to prefer frameworks over bare headers, reducing potential issues with non-modular headers, and (b) more likely to fail in the same way as LLDB if the -Xcc options also contain or affect search paths. rdar://problem/22413525 Swift SVN r31950
33 lines
1.5 KiB
Swift
33 lines
1.5 KiB
Swift
// RUN: rm -rf %t && mkdir -p %t/secret
|
|
// RUN: %target-swift-frontend -emit-module -o %t/secret %S/Inputs/struct_with_operators.swift
|
|
// RUN: mkdir -p %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 -DDUMMY
|
|
// RUN: %target-swift-frontend %s -parse -I %t
|
|
|
|
// 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
|
|
|
|
// XFAIL: linux
|
|
|
|
import has_xref
|
|
|
|
numeric(42)
|
|
|
|
// CHECK-LABEL: <OPTIONS_BLOCK
|
|
// CHECK: <XCC abbrevid={{[0-9]+}}/> blob data = '-working-directory'
|
|
// CHECK: <XCC abbrevid={{[0-9]+}}/> blob data = '{{.+}}/secret'
|
|
// CHECK: <XCC abbrevid={{[0-9]+}}/> blob data = '-DDUMMY'
|
|
// CHECK: </OPTIONS_BLOCK>
|
|
|
|
// CHECK-LABEL: <INPUT_BLOCK
|
|
// CHECK: <SEARCH_PATH abbrevid={{[0-9]+}} op0=1/> blob data = '{{.+}}/secret/../Frameworks'
|
|
// CHECK: <SEARCH_PATH abbrevid={{[0-9]+}} op0=0/> blob data = '{{.+}}/secret/.'
|
|
// CHECK: </INPUT_BLOCK>
|
|
|
|
// NEGATIVE-NOT: '.'
|
|
// NEGATIVE-NOT: '../Frameworks'
|