Files
swift-mirror/test/Interop/Cxx/class/debug-info-irgen.swift
Saleem Abdulrasool 357face86e test: introduce new target-swiftxx-frontend for C++ interop
Add an convert to the new `target-swiftxx-frontend` substitution in lit
to control the C++ interop enabling in Swift.  This allows for a single
site which will enable control of both an overridden standard (for
testing multiple C++ standards) and simplify writing tests.
2021-01-12 11:45:36 -08:00

20 lines
635 B
Swift

// RUN: %target-swiftxx-frontend -I %S/Inputs %s -emit-ir -g | %FileCheck %s
// Validate that we don't crash when trying to deserialize C++ type debug info.
// Note, however, that the actual debug info is not generated, see SR-13223.
import DebugInfo
public func create(_ x: Int32) -> IntWrapper { IntWrapper(value: x) }
public func getInt() -> Int32 { 0 }
// CHECK-LABEL: define {{.*}}void @"$s4main4testyyF"
// CHECK: [[I:%.*]] = call swiftcc i32 @"$s4main6getInts5Int32VyF"()
// CHECK: call swiftcc i32 @"$s4main6createySo10IntWrapperVs5Int32VF"(i32 [[I]])
// CHECK: ret void
public func test() {
let f = create(getInt())
}