Files
swift-mirror/test/DebugInfo/ParseableInterfaceImports.swift
Adrian Prantl 8d03cb7a61 Record parseable interface imports in the debug info.
When a Swift module built with debug info imports a library without
debug info from a textual interface, the textual interface is
necessary to reconstruct types defined in the library's interface.  By
recording the Swift interface files in DWARF dsymutil can collect them
and LLDB can find them.

rdar://problem/49751363
2019-04-11 14:50:07 -07:00

23 lines
770 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend-typecheck %S/basic.swift \
// RUN: -emit-parseable-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", includePath: "
// CHECK-SAME: basic.swiftinterface"
// We don;t record any parseable interfaces from the SDK.
// They're in the SDK after all.
// SDK: !DIModule(scope: null, name: "basic", includePath: "
// SDK-SAME: basic{{.*}}.swiftmodule"
func markUsed<T>(_ t: T) {}
markUsed(basic.foo(1, 2))