Files
swift-mirror/test/DebugInfo/ParseableInterfaceImports.swift
Daniel Rodríguez Troitiño 1de0e3bf3a [test] Improve ParseableInterfaceImports check patterns (#70519)
When one configures their toolchain to use a define (`-D`) in either
`SWIFT_FRONTEND_TEST_OPTIONS` or `SWIFT_DRIVER_TEST_OPTIONS`, the
DIModule generated by this test might have other elements like
`configMacros` in between `name:` and `includePath:`.

To account for this possibility, break the check in two, using
`CHECK-SAME` for the second part.
2023-12-19 06:46:52 -08:00

24 lines
809 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend-typecheck %S/basic.swift \
// RUN: -emit-module-interface-path %t/basic.swiftinterface
// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - \
// RUN: | %FileCheck %s
// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - \
// RUN: -sdk %t | %FileCheck %s --check-prefix=SDK
import basic
// CHECK: !DIModule(scope: null, name: "basic",
// CHECK-SAME: includePath: "
// CHECK-SAME: basic.swiftinterface"
// Even if the module interface is in the SDK, we still return the path
// to the swiftinterface.
// SDK: !DIModule(scope: null, name: "basic",
// SDK-SAME: includePath: "
// SDK-SAME: basic{{.*}}.swiftinterface"
func markUsed<T>(_ t: T) {}
markUsed(basic.foo(1, 2))