Files
swift-mirror/test/Interop/Cxx/class/destructors-with-temporary-values-irgen.swift
Egor Zhdan 93e7427ed2 [cxx-interop] Emit IR for destructors of temporary C++ values
This fixes the "undefined reference" linker errors.

rdar://101092732
2022-10-21 15:34:04 +01:00

14 lines
579 B
Swift

// RUN: %target-swiftxx-frontend -emit-ir -I %S/Inputs -validate-tbd-against-ir=none %s | %FileCheck %s
import DestructorsWithTemporaryValues
public func test() {
testFunction()
}
// Make sure that we emit IR for functions that are called from the custom
// destructor of a temporary value created on the C++ side.
// CHECK: define{{( dso_local)?}} void @{{_Z22referencedByDestructorP5Value|"\?referencedByDestructor@@YAXPEAUValue@@@Z"}}
// CHECK: define linkonce_odr{{( dso_local)?}} void @{{_ZN5Value22referencedByDestructorEv|"\?referencedByDestructor@Value@@QEAAXXZ"}}