mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
...and then honor them. While here, make -l a little more flexible (see interpret_with_options test). rdar://problem/17830826, which unblocks the LLDB feature for the same. Swift SVN r24033
18 lines
849 B
Swift
18 lines
849 B
Swift
// RUN: %swift_driver -sdk %sdk %s | FileCheck -check-prefix=WITHOUT-LIB %s
|
|
// RUN: %swift_driver -sdk %sdk -L %S/Inputs/ -lTestLoad %s | FileCheck -check-prefix=WITH-LIB %s
|
|
// RUN: %swift_driver -sdk %sdk -L %S/Inputs/ -llibTestLoad.dylib %s | FileCheck -check-prefix=WITH-LIB %s
|
|
// RUN: %swift_driver -sdk %sdk -l%S/Inputs/libTestLoad.dylib %s | FileCheck -check-prefix=WITH-LIB %s
|
|
// RUN: cd %S && %swift_driver -sdk %sdk -lInputs/libTestLoad.dylib %s | FileCheck -check-prefix=WITH-LIB %s
|
|
// REQUIRES: OS=macosx
|
|
|
|
import ObjectiveC
|
|
|
|
// FIXME: <rdar://problem/19302805> Crash when NSClassFromString returns nil
|
|
@asmname("objc_lookUpClass")
|
|
func lookUpClassOpaque(name: UnsafePointer<CChar>) -> COpaquePointer
|
|
|
|
let ptr = lookUpClassOpaque("ClassFromLibrary")
|
|
println("Loaded? \(ptr != nil)")
|
|
// WITH-LIB: Loaded? true
|
|
// WITHOUT-LIB: Loaded? false
|