Files
swift-mirror/test/Interop/Cxx/class/constructors-copy-irgen-windows.swift
Saleem Abdulrasool 1040116e32 IRGen: rework linking against CxxStdlib
Rewrite the handling for the `CxxStdlib` implicit linking to use a
slightly more functional style for filtering.  Additionally, add Windows
to the list providing the overlay.  The Windows linking scenario is a
slightly more complicated as the library names differ between static and
dynamic variants to disambiguate between import libraries and static
libraries.  Take this into account when embedding the library name so
that the linker can find the appropriate content.
2023-08-08 09:03:37 -07:00

21 lines
1.1 KiB
Swift

// Target-specific tests for C++ copy constructor code generation.
// RUN: %swift -module-name MySwift -target x86_64-unknown-windows-msvc %target-swift-flags -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=MICROSOFT_X64
// REQUIRES: OS=windows-msvc
// REQUIRES: CPU=x86_64
import Constructors
import TypeClassification
// MICROSOFT_X64-LABEL: define dllexport swiftcc void @"$s7MySwift35copyWithUserProvidedCopyConstructorySo03Has{{efgH0V_ADtADF|cdeF0V_ACtACF}}"
// MICROSOFT_X64-SAME: (ptr {{.*}}[[ARG0:%.*]], ptr {{.*}}[[ARG1:%.*]], ptr {{.*}}[[ARG2:%.*]])
// MICROSOFT_X64: call ptr @"??0HasUserProvidedCopyConstructor@@QEAA@AEBU0@@Z"(ptr [[ARG0]], ptr [[ARG2]])
// MICROSOFT_X64: call ptr @"??0HasUserProvidedCopyConstructor@@QEAA@AEBU0@@Z"(ptr [[ARG1]], ptr [[ARG2]])
// MICROSOFT_X64: ret void
public func copyWithUserProvidedCopyConstructor(_ x: HasUserProvidedCopyConstructor)
-> (HasUserProvidedCopyConstructor, HasUserProvidedCopyConstructor) {
return (x, x)
}