diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index b36e078a51f97..869db68d1df86 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1685,7 +1685,7 @@ static bool shouldAssumeDSOLocal(const CodeGenModule &CGM, const llvm::Triple &TT = CGM.getTriple(); const auto &CGOpts = CGM.getCodeGenOpts(); - if (TT.isWindowsGNUEnvironment()) { + if (TT.isOSCygMing()) { // In MinGW, variables without DLLImport can still be automatically // imported from a DLL by the linker; don't mark variables that // potentially could come from another DLL as DSO local. diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index 70b53be7e77a3..8826085c596da 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -3754,7 +3754,7 @@ static bool ShouldUseExternalRTTIDescriptor(CodeGenModule &CGM, bool IsDLLImport = RD->hasAttr(); // Don't import the RTTI but emit it locally. - if (CGM.getTriple().isWindowsGNUEnvironment()) + if (CGM.getTriple().isOSCygMing()) return false; if (CGM.getVTables().isVTableExternal(RD)) { @@ -4041,10 +4041,7 @@ static llvm::GlobalVariable::LinkageTypes getTypeInfoLinkage(CodeGenModule &CGM, return llvm::GlobalValue::ExternalLinkage; // MinGW always uses LinkOnceODRLinkage for type info. if (RD->isDynamicClass() && - !CGM.getContext() - .getTargetInfo() - .getTriple() - .isWindowsGNUEnvironment()) + !CGM.getContext().getTargetInfo().getTriple().isOSCygMing()) return CGM.getVTableLinkage(RD); } diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 7cce7ed1fa054..8d8fe26e1ac6e 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -6274,7 +6274,7 @@ static void ReferenceDllExportedMembers(Sema &S, CXXRecordDecl *Class) { } } MarkingDllexportedContext(S, Class, ClassAttr->getLocation()); - if (S.Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) + if (S.Context.getTargetInfo().getTriple().isOSCygMing()) S.MarkVTableUsed(Class->getLocation(), Class, true); for (Decl *Member : Class->decls()) { @@ -6576,7 +6576,7 @@ void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { // declarations, except in MinGW mode. if (ClassExported && !ClassAttr->isInherited() && TSK == TSK_ExplicitInstantiationDeclaration && - !Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) { + !Context.getTargetInfo().getTriple().isOSCygMing()) { Class->dropAttr(); return; } diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 95c7b6f25ddc6..5798bce06df96 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -8938,8 +8938,7 @@ Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, // The declaration itself has not actually been instantiated, so it is // still okay to specialize it. StripImplicitInstantiation( - PrevDecl, - Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()); + PrevDecl, Context.getTargetInfo().getTriple().isOSCygMing()); return false; } // Fall through @@ -9806,7 +9805,7 @@ DeclResult Sema::ActOnExplicitInstantiation( : TSK_ExplicitInstantiationDeclaration; if (TSK == TSK_ExplicitInstantiationDeclaration && - !Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) { + !Context.getTargetInfo().getTriple().isOSCygMing()) { // Check for dllexport class template instantiation declarations, // except for MinGW mode. for (const ParsedAttr &AL : Attr) { @@ -9871,7 +9870,7 @@ DeclResult Sema::ActOnExplicitInstantiation( = PrevDecl ? PrevDecl->getTemplateSpecializationKind() : TSK_Undeclared; if (TSK == TSK_ExplicitInstantiationDefinition && PrevDecl != nullptr && - Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) { + Context.getTargetInfo().getTriple().isOSCygMing()) { // Check for dllexport class template instantiation definitions in MinGW // mode, if a previous declaration of the instantiation was seen. for (const ParsedAttr &AL : Attr) { @@ -10039,7 +10038,7 @@ DeclResult Sema::ActOnExplicitInstantiation( // In MinGW mode, export the template instantiation if the declaration // was marked dllexport. if (PrevDecl_TSK == TSK_ExplicitInstantiationDeclaration && - Context.getTargetInfo().getTriple().isWindowsGNUEnvironment() && + Context.getTargetInfo().getTriple().isOSCygMing() && PrevDecl->hasAttr()) { dllExportImportClassTemplateSpecialization(*this, Def); } diff --git a/clang/test/CodeGen/dllexport.c b/clang/test/CodeGen/dllexport.c index 4c1143cf5ca48..f64bcb5393005 100644 --- a/clang/test/CodeGen/dllexport.c +++ b/clang/test/CodeGen/dllexport.c @@ -2,6 +2,8 @@ // RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s // RUN: %clang_cc1 -triple i686-windows-gnu -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s // RUN: %clang_cc1 -triple x86_64-windows-gnu -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple i686-pc-cygwin -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s diff --git a/clang/test/CodeGen/dllimport.c b/clang/test/CodeGen/dllimport.c index 6170c8c4a66a3..1631c6dc56805 100644 --- a/clang/test/CodeGen/dllimport.c +++ b/clang/test/CodeGen/dllimport.c @@ -2,8 +2,11 @@ // RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck --check-prefix=CHECK --check-prefix=MS %s // RUN: %clang_cc1 -triple i686-windows-gnu -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck --check-prefix=CHECK --check-prefix=GNU %s // RUN: %clang_cc1 -triple x86_64-windows-gnu -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck --check-prefix=CHECK --check-prefix=GNU %s +// RUN: %clang_cc1 -triple i686-pc-cygwin -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck --check-prefix=CHECK --check-prefix=GNU %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -fms-extensions -emit-llvm -std=c11 -O0 -o - %s | FileCheck --check-prefix=CHECK --check-prefix=GNU %s // RUN: %clang_cc1 -triple i686-windows-msvc -fms-extensions -emit-llvm -std=c11 -O1 -fno-inline -o - %s | FileCheck --check-prefix=O1 --check-prefix=MO1 %s // RUN: %clang_cc1 -triple i686-windows-gnu -fms-extensions -emit-llvm -std=c11 -O1 -fno-inline -o - %s | FileCheck --check-prefix=O1 --check-prefix=GO1 %s +// RUN: %clang_cc1 -triple i686-pc-cygwin -fms-extensions -emit-llvm -std=c11 -O1 -fno-inline -o - %s | FileCheck --check-prefix=O1 --check-prefix=GO1 %s #define JOIN2(x, y) x##y #define JOIN(x, y) JOIN2(x, y) diff --git a/clang/test/CodeGen/dso-local-executable.c b/clang/test/CodeGen/dso-local-executable.c index 15575d3927f23..880273df137d7 100644 --- a/clang/test/CodeGen/dso-local-executable.c +++ b/clang/test/CodeGen/dso-local-executable.c @@ -12,6 +12,9 @@ // RUN: %clang_cc1 -triple x86_64-w64-mingw32 -emit-llvm %s -o - | FileCheck --check-prefixes=MINGW,MINGW-NATIVE_TLS,MINGW-AUTO-IMPORT %s // RUN: %clang_cc1 -triple x86_64-w64-mingw32 -emit-llvm %s -o - -fno-auto-import | FileCheck --check-prefixes=MINGW,MINGW-NATIVE_TLS,MINGW-NO-AUTO-IMPORT %s // RUN: %clang_cc1 -triple x86_64-w64-mingw32 -emit-llvm %s -o - -femulated-tls | FileCheck --check-prefixes=MINGW,MINGW-EMUTLS,MINGW-AUTO-IMPORT %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -emit-llvm %s -o - | FileCheck --check-prefixes=MINGW,MINGW-NATIVE_TLS,MINGW-AUTO-IMPORT %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -emit-llvm %s -o - -fno-auto-import | FileCheck --check-prefixes=MINGW,MINGW-NATIVE_TLS,MINGW-NO-AUTO-IMPORT %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -emit-llvm %s -o - -femulated-tls | FileCheck --check-prefixes=MINGW,MINGW-EMUTLS,MINGW-AUTO-IMPORT %s // MINGW: @baz = dso_local global i32 42 // MINGW-NEXT: @import_var = external dllimport global i32 // MINGW-NEXT: @weak_bar = extern_weak global i32 diff --git a/clang/test/CodeGenCXX/dllexport-members.cpp b/clang/test/CodeGenCXX/dllexport-members.cpp index e4effa4c72c72..3753050cbf7d5 100644 --- a/clang/test/CodeGenCXX/dllexport-members.cpp +++ b/clang/test/CodeGenCXX/dllexport-members.cpp @@ -4,6 +4,8 @@ // RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-msvc -fms-compatibility -fms-compatibility-version=19 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=M64VS2015 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-pc-cygwin -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=C32 %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-pc-cygwin -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s // Helper structs to make templates more expressive. struct ImplicitInst_Exported {}; @@ -35,12 +37,16 @@ struct ExportMembers { // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDecl@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"?normalInlineDecl@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers9normalDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN13ExportMembers9normalDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers9normalDefEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers13normalInclassEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers13normalInclassEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers13normalInclassEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers15normalInlineDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers15normalInlineDefEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers15normalInlineDefEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this) // M32-DAG: define linkonce_odr dso_local x86_thiscallcc void @"?referencedNonExportedInClass@ExportMembers@@QAEXXZ" __declspec(dllexport) void normalDef(); @@ -58,12 +64,16 @@ struct ExportMembers { // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDecl@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"?virtualInlineDecl@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers10virtualDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN13ExportMembers10virtualDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers10virtualDefEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers14virtualInclassEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers14virtualInclassEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers14virtualInclassEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this) __declspec(dllexport) virtual void virtualDef(); __declspec(dllexport) virtual void virtualInclass() {} @@ -86,6 +96,7 @@ struct ExportMembers { // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?protectedDef@ExportMembers@@IAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local dllexport void @"?protectedDef@ExportMembers@@IEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers12protectedDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN13ExportMembers12protectedDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers12protectedDefEv(ptr {{[^,]*}} %this) // MSC-DAG: define dso_local dllexport void @"?protectedStaticDef@ExportMembers@@KAXXZ"() // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers18protectedStaticDefEv() @@ -96,6 +107,7 @@ struct ExportMembers { // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?privateDef@ExportMembers@@AAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local dllexport void @"?privateDef@ExportMembers@@AEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers10privateDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN13ExportMembers10privateDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers10privateDefEv(ptr {{[^,]*}} %this) // MSC-DAG: define dso_local dllexport void @"?privateStaticDef@ExportMembers@@CAXXZ"() // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers16privateStaticDefEv() @@ -106,6 +118,7 @@ struct ExportMembers { // M32-DAG: define dso_local x86_thiscallcc void @"?ignored@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local void @"?ignored@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local x86_thiscallcc void @_ZN13ExportMembers7ignoredEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local void @_ZN13ExportMembers7ignoredEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local void @_ZN13ExportMembers7ignoredEv(ptr {{[^,]*}} %this) public: void ignored(); @@ -163,12 +176,16 @@ struct ExportMembers::Nested { // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDecl@Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"?normalInlineDecl@Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this) __declspec(dllexport) void normalDef(); __declspec(dllexport) void normalInclass() {} @@ -184,12 +201,16 @@ struct ExportMembers::Nested { // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDecl@Nested@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"?virtualInlineDecl@Nested@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this) __declspec(dllexport) virtual void virtualDef(); __declspec(dllexport) virtual void virtualInclass() {} @@ -212,6 +233,7 @@ struct ExportMembers::Nested { // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?protectedDef@Nested@ExportMembers@@IAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local dllexport void @"?protectedDef@Nested@ExportMembers@@IEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested12protectedDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested12protectedDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested12protectedDefEv(ptr {{[^,]*}} %this) // MSC-DAG: define dso_local dllexport void @"?protectedStaticDef@Nested@ExportMembers@@KAXXZ"() // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested18protectedStaticDefEv() @@ -222,6 +244,7 @@ struct ExportMembers::Nested { // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?privateDef@Nested@ExportMembers@@AAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local dllexport void @"?privateDef@Nested@ExportMembers@@AEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10privateDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested10privateDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested10privateDefEv(ptr {{[^,]*}} %this) // MSC-DAG: define dso_local dllexport void @"?privateStaticDef@Nested@ExportMembers@@CAXXZ"() // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested16privateStaticDefEv() @@ -232,6 +255,7 @@ struct ExportMembers::Nested { // M32-DAG: define dso_local x86_thiscallcc void @"?ignored@Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local void @"?ignored@Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local x86_thiscallcc void @_ZN13ExportMembers6Nested7ignoredEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local void @_ZN13ExportMembers6Nested7ignoredEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local void @_ZN13ExportMembers6Nested7ignoredEv(ptr {{[^,]*}} %this) public: void ignored(); @@ -283,44 +307,54 @@ struct ExportSpecials { // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportSpecials@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this) // M64-DAG: define dso_local dllexport ptr @"??0ExportSpecials@@QEAA@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1Ev(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC1Ev(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC1Ev(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2Ev(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC2Ev(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC2Ev(ptr {{[^,]*}} %this) __declspec(dllexport) ExportSpecials(); // M32-DAG: define dso_local dllexport x86_thiscallcc void @"??1ExportSpecials@@QAE@XZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local dllexport void @"??1ExportSpecials@@QEAA@XZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsD1Ev(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN14ExportSpecialsD1Ev(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsD1Ev(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsD2Ev(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local dllexport void @_ZN14ExportSpecialsD2Ev(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsD2Ev(ptr {{[^,]*}} %this) __declspec(dllexport) ~ExportSpecials(); // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportSpecials@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define dso_local dllexport ptr @"??0ExportSpecials@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllexport) ExportSpecials(const ExportSpecials&); // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QEAAAEAU0@AEBU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllexport) ExportSpecials& operator=(const ExportSpecials&); // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportSpecials@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define dso_local dllexport ptr @"??0ExportSpecials@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllexport) ExportSpecials(ExportSpecials&&); // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllexport) ExportSpecials& operator=(ExportSpecials&&); }; @@ -337,36 +371,42 @@ struct ExportInlineSpecials { // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportInlineSpecials@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport ptr @"??0ExportInlineSpecials@@QEAA@XZ"( // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1Ev( + // C32-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsC1Ev( // G64-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsC1Ev( __declspec(dllexport) ExportInlineSpecials() {} // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportInlineSpecials@@QAE@XZ"( // M64-DAG: define weak_odr dso_local dllexport void @"??1ExportInlineSpecials@@QEAA@XZ"( // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsD1Ev( + // C32-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsD1Ev( // G64-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsD1Ev( __declspec(dllexport) ~ExportInlineSpecials() {} // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportInlineSpecials@@QAE@ABU0@@Z"( // M64-DAG: define weak_odr dso_local dllexport ptr @"??0ExportInlineSpecials@@QEAA@AEBU0@@Z"( // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1ERKS_( + // C32-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsC1ERKS_( // G64-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsC1ERKS_( __declspec(dllexport) inline ExportInlineSpecials(const ExportInlineSpecials&); // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QAEAAU0@ABU0@@Z"( // M64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QEAAAEAU0@AEBU0@@Z"( // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSERKS_( + // C32-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSERKS_( // G64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSERKS_( __declspec(dllexport) ExportInlineSpecials& operator=(const ExportInlineSpecials&); // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportInlineSpecials@@QAE@$$QAU0@@Z"( // M64-DAG: define weak_odr dso_local dllexport ptr @"??0ExportInlineSpecials@@QEAA@$$QEAU0@@Z"( // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1EOS_( + // C32-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsC1EOS_( // G64-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsC1EOS_( __declspec(dllexport) ExportInlineSpecials(ExportInlineSpecials&&) {} // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QAEAAU0@$$QAU0@@Z"( // M64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"( // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSEOS_( + // C32-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSEOS_( // G64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSEOS_( __declspec(dllexport) ExportInlineSpecials& operator=(ExportInlineSpecials&&) { return *this; } }; @@ -387,44 +427,54 @@ struct ExportDefaultedDefs { // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedDefs@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this) // M64-DAG: define dso_local dllexport ptr @"??0ExportDefaultedDefs@@QEAA@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1Ev(ptr {{[^,]*}} %this) +// C32-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC1Ev(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC1Ev(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2Ev(ptr {{[^,]*}} %this) +// C32-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC2Ev(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC2Ev(ptr {{[^,]*}} %this) __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs() = default; // M32-DAG: define dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedDefs@@QAE@XZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local dllexport void @"??1ExportDefaultedDefs@@QEAA@XZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD1Ev(ptr {{[^,]*}} %this) +// C32-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsD1Ev(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsD1Ev(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD2Ev(ptr {{[^,]*}} %this) +// C32-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsD2Ev(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsD2Ev(ptr {{[^,]*}} %this) ExportDefaultedDefs::~ExportDefaultedDefs() = default; // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedDefs@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define weak_odr dso_local dllexport ptr @"??0ExportDefaultedDefs@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define weak_odr dso_local dllexport void @_ZN19ExportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define weak_odr dso_local dllexport void @_ZN19ExportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define weak_odr dso_local dllexport void @_ZN19ExportDefaultedDefsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define weak_odr dso_local dllexport void @_ZN19ExportDefaultedDefsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(const ExportDefaultedDefs&) = default; // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QEAAAEAU0@AEBU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) inline ExportDefaultedDefs& ExportDefaultedDefs::operator=(const ExportDefaultedDefs&) = default; // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedDefs@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define dso_local dllexport ptr @"??0ExportDefaultedDefs@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(ExportDefaultedDefs&&) = default; // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) ExportDefaultedDefs& ExportDefaultedDefs::operator=(ExportDefaultedDefs&&) = default; @@ -466,24 +516,28 @@ struct ExportAlloc { // M32-DAG: define dso_local dllexport ptr @"??2ExportAlloc@@SAPAXI@Z"(i32 %n) // M64-DAG: define dso_local dllexport ptr @"??2ExportAlloc@@SAPEAX_K@Z"(i64 %n) // G32-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnwEj(i32 %n) -// G64-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnwEy(i64 %n) +// C32-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnwEj(i32 %n) +// G64-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnwE{{[ym]}}(i64 %n) void* ExportAlloc::operator new(__SIZE_TYPE__ n) { return malloc(n); } // M32-DAG: define dso_local dllexport ptr @"??_UExportAlloc@@SAPAXI@Z"(i32 %n) // M64-DAG: define dso_local dllexport ptr @"??_UExportAlloc@@SAPEAX_K@Z"(i64 %n) // G32-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnaEj(i32 %n) -// G64-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnaEy(i64 %n) +// C32-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnaEj(i32 %n) +// G64-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnaE{{[ym]}}(i64 %n) void* ExportAlloc::operator new[](__SIZE_TYPE__ n) { return malloc(n); } // M32-DAG: define dso_local dllexport void @"??3ExportAlloc@@SAXPAX@Z"(ptr %p) // M64-DAG: define dso_local dllexport void @"??3ExportAlloc@@SAXPEAX@Z"(ptr %p) // G32-DAG: define dso_local dllexport void @_ZN11ExportAllocdlEPv(ptr %p) +// C32-DAG: define dso_local dllexport void @_ZN11ExportAllocdlEPv(ptr %p) // G64-DAG: define dso_local dllexport void @_ZN11ExportAllocdlEPv(ptr %p) void ExportAlloc::operator delete(void* p) { free(p); } // M32-DAG: define dso_local dllexport void @"??_VExportAlloc@@SAXPAX@Z"(ptr %p) // M64-DAG: define dso_local dllexport void @"??_VExportAlloc@@SAXPEAX@Z"(ptr %p) // G32-DAG: define dso_local dllexport void @_ZN11ExportAllocdaEPv(ptr %p) +// C32-DAG: define dso_local dllexport void @_ZN11ExportAllocdaEPv(ptr %p) // G64-DAG: define dso_local dllexport void @_ZN11ExportAllocdaEPv(ptr %p) void ExportAlloc::operator delete[](void* p) { free(p); } @@ -504,6 +558,7 @@ void useMemFunTmpl() { // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UImplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"??$exportedNormal@UImplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(ptr {{[^,]*}} %this) + // C32-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(ptr {{[^,]*}} %this) MemFunTmpl().exportedNormal(); @@ -518,6 +573,7 @@ void useMemFunTmpl() { // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"??$exportedNormal@UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this) extern template void MemFunTmpl::exportedNormal(); template void MemFunTmpl::exportedNormal(); @@ -533,6 +589,7 @@ extern template void MemFunTmpl::exportedStatic(); // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"??$exportedNormal@UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this) template void MemFunTmpl::exportedNormal(); @@ -545,12 +602,14 @@ template void MemFunTmpl::exportedStatic(); // M32-DAG: define dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local dllexport void @"??$exportedNormal@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this) template<> __declspec(dllexport) void MemFunTmpl::exportedNormal() {} // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"??$exportedNormal@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this) template<> __declspec(dllexport) inline void MemFunTmpl::exportedNormal() {} @@ -568,6 +627,7 @@ template<> __declspec(dllexport) inline void MemFunTmpl::exportedStatic void MemFunTmpl::exportedNormal() {} @@ -581,6 +641,7 @@ template<> void MemFunTmpl::exportedStatic() {} // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef@UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"??$normalDef@UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this) extern template __declspec(dllexport) void MemFunTmpl::normalDef(); template __declspec(dllexport) void MemFunTmpl::normalDef(); @@ -596,6 +657,7 @@ extern template __declspec(dllexport) void MemFunTmpl::staticDef(); @@ -610,8 +672,10 @@ template __declspec(dllexport) void MemFunTmpl::staticDef // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define weak_odr dso_local dllexport void @"??$normalDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define dso_local dllexport void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local dllexport void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this) // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this) template<> __declspec(dllexport) void MemFunTmpl::normalDef() {} template<> __declspec(dllexport) inline void MemFunTmpl::normalDef() {} @@ -692,8 +756,10 @@ template struct ClassTmplMem { // MSVC exports explicit specialization of exported class template member function; MinGW does not. // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?exportedNormal@?$ClassTmplMem@H@@QAEXXZ" // G32-DAG: define dso_local x86_thiscallcc void @_ZN12ClassTmplMemIiE14exportedNormalEv +// C32-DAG: define dso_local void @_ZN12ClassTmplMemIiE14exportedNormalEv template<> void ClassTmplMem::exportedNormal() {} // M32-DAG: define dso_local dllexport void @"?exportedStatic@?$ClassTmplMem@H@@SAXXZ" // G32-DAG: define dso_local void @_ZN12ClassTmplMemIiE14exportedStaticEv +// C32-DAG: define dso_local void @_ZN12ClassTmplMemIiE14exportedStaticEv template<> void ClassTmplMem::exportedStatic() {} diff --git a/clang/test/CodeGenCXX/dllexport-missing-key.cpp b/clang/test/CodeGenCXX/dllexport-missing-key.cpp index 90e736f6fad3a..505679f315331 100644 --- a/clang/test/CodeGenCXX/dllexport-missing-key.cpp +++ b/clang/test/CodeGenCXX/dllexport-missing-key.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -std=c++11 -o - %s | FileCheck --check-prefix=GNU %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -emit-llvm -std=c++11 -o - %s | FileCheck --check-prefix=GNU %s class __declspec(dllexport) QAbstractLayoutStyleInfo { public: diff --git a/clang/test/CodeGenCXX/dllexport.cpp b/clang/test/CodeGenCXX/dllexport.cpp index c8ac526f4cbe3..dfbb2762ac85c 100644 --- a/clang/test/CodeGenCXX/dllexport.cpp +++ b/clang/test/CodeGenCXX/dllexport.cpp @@ -6,8 +6,10 @@ // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=GNU --check-prefix=G32 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-gnu -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=GNU %s -// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-scei-ps4 -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=PS %s -// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-sie-ps5 -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=PS %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-pc-cygwin -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=GNU --check-prefix=C32 %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-pc-cygwin -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=GNU %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-scei-ps4 -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=PS %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-sie-ps5 -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=PS %s // Helper structs to make templates more expressive. struct ImplicitInst_Exported {}; @@ -308,7 +310,7 @@ void Befriended::func() {} // Implicit declarations can be redeclared with dllexport. // MSC-DAG: define dso_local dllexport nonnull ptr @"??2@{{YAPAXI|YAPEAX_K}}@Z"( -// GNU-DAG: define dso_local dllexport nonnull ptr @_Znw{{[yj]}}( +// GNU-DAG: define dso_local dllexport nonnull ptr @_Znw{{[yjm]}}( void* alloc(__SIZE_TYPE__ n); __declspec(dllexport) void* operator new(__SIZE_TYPE__ n) { return alloc(n); } @@ -616,6 +618,7 @@ void W::foo() {} // M32-DAG: [[W_VTABLE:@.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4W@@6B@", ptr @"?foo@W@@UAEXXZ"] }, comdat($"??_7W@@6B@") // M32-DAG: @"??_7W@@6B@" = dllexport unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr [[W_VTABLE]], i32 0, i32 0, i32 1) // G32-DAG: @_ZTV1W = dso_local dllexport unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI1W, ptr @_ZN1W3fooEv] } +// C32-DAG: @_ZTV1W = dso_local dllexport unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI1W, ptr @_ZN1W3fooEv] } struct __declspec(dllexport) X : public virtual W {}; // vbtable: @@ -699,6 +702,7 @@ template void PartiallySpecializedClassTemplate::f() {} USEMEMFUNC(PartiallySpecializedClassTemplate, f); // M32-DAG: define linkonce_odr dso_local x86_thiscallcc void @"?f@?$PartiallySpecializedClassTemplate@PAX@@QAEXXZ" // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN33PartiallySpecializedClassTemplateIPvE1fEv +// C32-DAG: define weak_odr dso_local dllexport void @_ZN33PartiallySpecializedClassTemplateIPvE1fEv // Attributes on explicit specializations are honored. template struct ExplicitlySpecializedClassTemplate {}; @@ -707,6 +711,7 @@ void ExplicitlySpecializedClassTemplate::f() {} USEMEMFUNC(ExplicitlySpecializedClassTemplate, f); // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?f@?$ExplicitlySpecializedClassTemplate@PAX@@QAEXXZ" // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN34ExplicitlySpecializedClassTemplateIPvE1fEv +// C32-DAG: define dso_local dllexport void @_ZN34ExplicitlySpecializedClassTemplateIPvE1fEv // MS inherits DLL attributes to partial specializations. template struct __declspec(dllexport) PartiallySpecializedExportedClassTemplate {}; @@ -714,6 +719,7 @@ template struct PartiallySpecializedExportedClassTemplate { voi USEMEMFUNC(PartiallySpecializedExportedClassTemplate, f); // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?f@?$PartiallySpecializedExportedClassTemplate@PAX@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN41PartiallySpecializedExportedClassTemplateIPvE1fEv +// C32-DAG: define linkonce_odr dso_local void @_ZN41PartiallySpecializedExportedClassTemplateIPvE1fEv // MS ignores DLL attributes on partial specializations; inheritance still works though. template struct __declspec(dllexport) PartiallySpecializedExportedClassTemplate2 {}; @@ -722,6 +728,7 @@ template void PartiallySpecializedExportedClassTemplate2::f() { USEMEMFUNC(PartiallySpecializedExportedClassTemplate2, f); // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?f@?$PartiallySpecializedExportedClassTemplate2@PAX@@QAEXXZ" // G32-DAG: declare dllimport x86_thiscallcc void @_ZN42PartiallySpecializedExportedClassTemplate2IPvE1fEv +// C32-DAG: declare dllimport void @_ZN42PartiallySpecializedExportedClassTemplate2IPvE1fEv // Attributes on the instantiation take precedence over attributes on the template. template struct __declspec(dllimport) ExplicitlyInstantiatedWithDifferentAttr { void f() {} }; @@ -771,6 +778,7 @@ USEMEMFUNC(ExplicitInstantiationDeclExportedDefTemplate, f); // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?f@?$ExplicitInstantiationDeclExportedDefTemplate@H@@QAEXXZ" // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$ExplicitInstantiationDeclExportedDefTemplate@H@@QAE@XZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN44ExplicitInstantiationDeclExportedDefTemplateIiE1fEv +// C32-DAG: define weak_odr dso_local void @_ZN44ExplicitInstantiationDeclExportedDefTemplateIiE1fEv template struct ImplicitInstantiationExportedExplicitInstantiationDefTemplate { virtual void f() {} }; ImplicitInstantiationExportedExplicitInstantiationDefTemplate ImplicitInstantiationExportedExplicitInstantiationDefTemplateInstance; @@ -778,6 +786,7 @@ template struct __declspec(dllexport) ImplicitInstantiationExportedExplicitInsta USEMEMFUNC(ImplicitInstantiationExportedExplicitInstantiationDefTemplate, f); // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?f@?$ImplicitInstantiationExportedExplicitInstantiationDefTemplate@H@@UAEXXZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN61ImplicitInstantiationExportedExplicitInstantiationDefTemplateIiE1fEv +// C32-DAG: define weak_odr dso_local void @_ZN61ImplicitInstantiationExportedExplicitInstantiationDefTemplateIiE1fEv template struct __declspec(dllexport) ImplicitInstantiationExplicitInstantiationDefExportedTemplate { virtual void f() {} }; ImplicitInstantiationExplicitInstantiationDefExportedTemplate ImplicitInstantiationExplicitInstantiationDefExportedTemplateInstance; @@ -785,6 +794,7 @@ template struct ImplicitInstantiationExplicitInstantiationDefExportedTemplate, f); // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?f@?$ImplicitInstantiationExplicitInstantiationDefExportedTemplate@H@@UAEXXZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN61ImplicitInstantiationExplicitInstantiationDefExportedTemplateIiE1fEv +// C32-DAG: define weak_odr dso_local void @_ZN61ImplicitInstantiationExplicitInstantiationDefExportedTemplateIiE1fEv template struct __declspec(dllexport) ImplicitInstantiationExportedExplicitInstantiationDefExportedTemplate { virtual void f() {} }; ImplicitInstantiationExportedExplicitInstantiationDefExportedTemplate ImplicitInstantiationExportedExplicitInstantiationDefExportedTemplateInstance; @@ -792,6 +802,7 @@ template struct __declspec(dllexport) ImplicitInstantiationExportedExplicitInsta USEMEMFUNC(ImplicitInstantiationExportedExplicitInstantiationDefExportedTemplate, f); // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?f@?$ImplicitInstantiationExportedExplicitInstantiationDefExportedTemplate@H@@UAEXXZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN69ImplicitInstantiationExportedExplicitInstantiationDefExportedTemplateIiE1fEv +// C32-DAG: define weak_odr dso_local void @_ZN69ImplicitInstantiationExportedExplicitInstantiationDefExportedTemplateIiE1fEv namespace { struct InternalLinkageType {}; } struct __declspec(dllexport) PR23308 { @@ -982,6 +993,7 @@ struct __declspec(dllexport) DerivedFromTemplate : public ClassTemplate {}; USEMEMFUNC(DerivedFromTemplate, func) // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?func@?$ClassTemplate@H@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ClassTemplateIiE4funcEv +// C32-DAG: define linkonce_odr dso_local void @_ZN13ClassTemplateIiE4funcEv // PS-DAG: define weak_odr dllexport void @_ZN13ClassTemplateIiE4funcEv // ExportedTemplate is explicitly exported. @@ -989,6 +1001,7 @@ struct __declspec(dllexport) DerivedFromExportedTemplate : public ExportedClassT USEMEMFUNC(DerivedFromExportedTemplate, func) // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?func@?$ExportedClassTemplate@H@@QAEXXZ" // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN21ExportedClassTemplateIiE4funcEv +// C32-DAG: define weak_odr dso_local dllexport void @_ZN21ExportedClassTemplateIiE4funcEv // PS-DAG: define weak_odr dllexport void @_ZN21ExportedClassTemplateIiE4funcEv // ImportedClassTemplate is explicitly imported. @@ -996,6 +1009,7 @@ struct __declspec(dllexport) DerivedFromImportedTemplate : public ImportedClassT USEMEMFUNC(DerivedFromImportedTemplate, func) // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"?func@?$ImportedClassTemplate@H@@QAEXXZ" // G32-DAG: declare dllimport x86_thiscallcc void @_ZN21ImportedClassTemplateIiE4funcEv +// C32-DAG: declare dllimport void @_ZN21ImportedClassTemplateIiE4funcEv // PS-DAG: declare dllimport void @_ZN21ImportedClassTemplateIiE4funcEv // Base class already implicitly instantiated without dll attribute. @@ -1004,6 +1018,7 @@ struct __declspec(dllexport) DerivedFromTemplateD2 : public ClassTemplate USEMEMFUNC(DerivedFromTemplateB2, func) // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"?func@?$ClassTemplate@_N@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ClassTemplateIbE4funcEv +// C32-DAG: define linkonce_odr dso_local void @_ZN13ClassTemplateIbE4funcEv // PS-DAG: declare dllimport void @_ZN13ClassTemplateIbE4funcEv // Base class already specialized without dll attribute. @@ -1019,6 +1035,7 @@ struct __declspec(dllexport) DerivedFromExplicitlySpecializedTemplate : public E USEMEMFUNC(DerivedFromExplicitlySpecializedTemplate, func) // M32-DAG: define dso_local x86_thiscallcc void @"?func@?$ExplicitlySpecializedTemplate@H@@QAEXXZ" // G32-DAG: define dso_local x86_thiscallcc void @_ZN29ExplicitlySpecializedTemplateIiE4funcEv +// C32-DAG: define dso_local void @_ZN29ExplicitlySpecializedTemplateIiE4funcEv // PS-DAG: define dso_local void @_ZN29ExplicitlySpecializedTemplateIiE4funcEv // Base class alredy specialized with export attribute. @@ -1026,6 +1043,7 @@ struct __declspec(dllexport) DerivedFromExplicitlyExportSpecializedTemplate : pu USEMEMFUNC(DerivedFromExplicitlyExportSpecializedTemplate, func) // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?func@?$ExplicitlyExportSpecializedTemplate@H@@QAEXXZ" // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN35ExplicitlyExportSpecializedTemplateIiE4funcEv +// C32-DAG: define dso_local dllexport void @_ZN35ExplicitlyExportSpecializedTemplateIiE4funcEv // PS-DAG: define dso_local dllexport void @_ZN35ExplicitlyExportSpecializedTemplateIiE4funcEv // Base class already specialized with import attribute. @@ -1033,6 +1051,7 @@ struct __declspec(dllexport) DerivedFromExplicitlyImportSpecializedTemplate : pu USEMEMFUNC(DerivedFromExplicitlyImportSpecializedTemplate, func) // M32-DAG: declare dllimport x86_thiscallcc void @"?func@?$ExplicitlyImportSpecializedTemplate@H@@QAEXXZ" // G32-DAG: declare dllimport x86_thiscallcc void @_ZN35ExplicitlyImportSpecializedTemplateIiE4funcEv +// C32-DAG: declare dllimport void @_ZN35ExplicitlyImportSpecializedTemplateIiE4funcEv // PS-DAG: declare dllimport void @_ZN35ExplicitlyImportSpecializedTemplateIiE4funcEv // Base class already instantiated without dll attribute. @@ -1040,6 +1059,7 @@ struct __declspec(dllexport) DerivedFromExplicitlyInstantiatedTemplate : public USEMEMFUNC(DerivedFromExplicitlyInstantiatedTemplate, func) // M32-DAG: define weak_odr dso_local x86_thiscallcc void @"?func@?$ExplicitlyInstantiatedTemplate@H@@QAEXXZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN30ExplicitlyInstantiatedTemplateIiE4funcEv +// C32-DAG: define weak_odr dso_local void @_ZN30ExplicitlyInstantiatedTemplateIiE4funcEv // PS-DAG: define weak_odr void @_ZN30ExplicitlyInstantiatedTemplateIiE4funcEv // Base class already instantiated with export attribute. @@ -1047,6 +1067,7 @@ struct __declspec(dllexport) DerivedFromExplicitlyExportInstantiatedTemplate : p USEMEMFUNC(DerivedFromExplicitlyExportInstantiatedTemplate, func) // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?func@?$ExplicitlyExportInstantiatedTemplate@H@@QAEXXZ" // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN36ExplicitlyExportInstantiatedTemplateIiE4funcEv +// C32-DAG: define weak_odr dso_local dllexport void @_ZN36ExplicitlyExportInstantiatedTemplateIiE4funcEv // PS-DAG: define weak_odr dllexport void @_ZN36ExplicitlyExportInstantiatedTemplateIiE4funcEv // Base class already instantiated with import attribute. @@ -1054,6 +1075,7 @@ struct __declspec(dllexport) DerivedFromExplicitlyImportInstantiatedTemplate : p USEMEMFUNC(DerivedFromExplicitlyImportInstantiatedTemplate, func) // M32-DAG: declare dllimport x86_thiscallcc void @"?func@?$ExplicitlyImportInstantiatedTemplate@H@@QAEXXZ" // G32-DAG: declare dllimport x86_thiscallcc void @_ZN36ExplicitlyImportInstantiatedTemplateIiE4funcEv +// C32-DAG: declare dllimport void @_ZN36ExplicitlyImportInstantiatedTemplateIiE4funcEv // PS-DAG: declare dllimport void @_ZN36ExplicitlyImportInstantiatedTemplateIiE4funcEv // MS: A dll attribute propagates through multiple levels of instantiation. @@ -1063,6 +1085,7 @@ struct __declspec(dllexport) BottomClass : public MiddleClass { }; USEMEMFUNC(BottomClass, func) // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?func@?$TopClass@H@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN8TopClassIiE4funcEv +// C32-DAG: define linkonce_odr dso_local void @_ZN8TopClassIiE4funcEv // PS-DAG: define weak_odr dllexport void @_ZN8TopClassIiE4funcEv template struct ExplicitInstantiationDeclTemplateBase { void func() {} }; @@ -1071,6 +1094,7 @@ struct __declspec(dllexport) DerivedFromExplicitInstantiationDeclTemplateBase : template struct ExplicitInstantiationDeclTemplateBase; // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?func@?$ExplicitInstantiationDeclTemplateBase@H@@QAEXXZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN37ExplicitInstantiationDeclTemplateBaseIiE4funcEv +// C32-DAG: define weak_odr dso_local void @_ZN37ExplicitInstantiationDeclTemplateBaseIiE4funcEv // PS-DAG: define weak_odr dllexport void @_ZN37ExplicitInstantiationDeclTemplateBaseIiE4funcEv // PR26076 diff --git a/clang/test/CodeGenCXX/dllimport-members.cpp b/clang/test/CodeGenCXX/dllimport-members.cpp index 19bd7fec3f337..896f1547b658f 100644 --- a/clang/test/CodeGenCXX/dllimport-members.cpp +++ b/clang/test/CodeGenCXX/dllimport-members.cpp @@ -2,8 +2,11 @@ // RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple x86_64-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC --check-prefix=M64 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple x86_64-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple i686-pc-cygwin -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=C32 %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple x86_64-pc-cygwin -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O1 -o - %s -DMSABI | FileCheck --check-prefix=MO1 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-gnu -emit-llvm -std=c++1y -O1 -o - %s | FileCheck --check-prefix=GO1 %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple i686-pc-cygwin -emit-llvm -std=c++1y -O1 -o - %s | FileCheck --check-prefix=CO1 %s // Helper structs to make templates more expressive. struct ImplicitInst_Imported {}; @@ -74,21 +77,29 @@ struct ImportMembers { // M32-DAG: declare dllimport x86_thiscallcc void @"?normalInlineDecl@ImportMembers@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"?normalInlineDecl@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: define dso_local x86_thiscallcc void @_ZN13ImportMembers9normalDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local void @_ZN13ImportMembers9normalDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local void @_ZN13ImportMembers9normalDefEv(ptr {{[^,]*}} %this) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers10normalDeclEv(ptr {{[^,]*}}) + // C32-DAG: declare dllimport void @_ZN13ImportMembers10normalDeclEv(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN13ImportMembers10normalDeclEv(ptr {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers13normalInclassEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers13normalInclassEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers13normalInclassEv(ptr {{[^,]*}} %this) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers15normalInlineDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers15normalInlineDefEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers15normalInlineDefEv(ptr {{[^,]*}} %this) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this) - // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this) + // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this) // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInclass@ImportMembers@@QAEXXZ"( // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInlineDef@ImportMembers@@QAEXXZ"( // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInlineDecl@ImportMembers@@QAEXXZ"( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers13normalInclassEv( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers15normalInlineDefEv( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers16normalInlineDeclEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers13normalInclassEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers15normalInlineDefEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers16normalInlineDeclEv( __declspec(dllimport) void normalDef(); // dllimport ignored __declspec(dllimport) void normalDecl(); __declspec(dllimport) void normalInclass() {} @@ -106,14 +117,19 @@ struct ImportMembers { // M32-DAG: declare dllimport x86_thiscallcc void @"?virtualInlineDecl@ImportMembers@@UAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"?virtualInlineDecl@ImportMembers@@UEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: define dso_local x86_thiscallcc void @_ZN13ImportMembers10virtualDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local void @_ZN13ImportMembers10virtualDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local void @_ZN13ImportMembers10virtualDefEv(ptr {{[^,]*}} %this) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers11virtualDeclEv(ptr {{[^,]*}}) + // C32-DAG: declare dllimport void @_ZN13ImportMembers11virtualDeclEv(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN13ImportMembers11virtualDeclEv(ptr {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers14virtualInclassEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers14virtualInclassEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers14virtualInclassEv(ptr {{[^,]*}} %this) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this) // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?virtualInclass@ImportMembers@@UAEXXZ"( // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?virtualInlineDef@ImportMembers@@UAEXXZ"( @@ -121,6 +137,9 @@ struct ImportMembers { // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers14virtualInclassEv( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers16virtualInlineDefEv( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers17virtualInlineDeclEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers14virtualInclassEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers16virtualInlineDefEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers17virtualInlineDeclEv( __declspec(dllimport) virtual void virtualDef(); // dllimport ignored __declspec(dllimport) virtual void virtualDecl(); __declspec(dllimport) virtual void virtualInclass() {} @@ -143,6 +162,9 @@ struct ImportMembers { // GO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers13staticInclassEv() // GO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers15staticInlineDefEv() // GO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers16staticInlineDeclEv() + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers13staticInclassEv() + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers15staticInlineDefEv() + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers16staticInlineDeclEv() __declspec(dllimport) static void staticDef(); // dllimport ignored __declspec(dllimport) static void staticDecl(); __declspec(dllimport) static void staticInclass() {} @@ -152,6 +174,7 @@ struct ImportMembers { // M32-DAG: declare dllimport x86_thiscallcc void @"?protectedNormalDecl@ImportMembers@@IAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"?protectedNormalDecl@ImportMembers@@IEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers19protectedNormalDeclEv(ptr {{[^,]*}}) + // C32-DAG: declare dllimport void @_ZN13ImportMembers19protectedNormalDeclEv(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN13ImportMembers19protectedNormalDeclEv(ptr {{[^,]*}}) // MSC-DAG: declare dllimport void @"?protectedStaticDecl@ImportMembers@@KAXXZ"() // GNU-DAG: declare dllimport void @_ZN13ImportMembers19protectedStaticDeclEv() @@ -162,6 +185,7 @@ struct ImportMembers { // M32-DAG: declare dllimport x86_thiscallcc void @"?privateNormalDecl@ImportMembers@@AAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"?privateNormalDecl@ImportMembers@@AEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers17privateNormalDeclEv(ptr {{[^,]*}}) + // C32-DAG: declare dllimport void @_ZN13ImportMembers17privateNormalDeclEv(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN13ImportMembers17privateNormalDeclEv(ptr {{[^,]*}}) // MSC-DAG: declare dllimport void @"?privateStaticDecl@ImportMembers@@CAXXZ"() // GNU-DAG: declare dllimport void @_ZN13ImportMembers17privateStaticDeclEv() @@ -172,6 +196,7 @@ struct ImportMembers { // M32-DAG: declare dso_local x86_thiscallcc void @"?ignored@ImportMembers@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dso_local void @"?ignored@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dso_local x86_thiscallcc void @_ZN13ImportMembers7ignoredEv(ptr {{[^,]*}}) + // C32-DAG: declare dso_local void @_ZN13ImportMembers7ignoredEv(ptr {{[^,]*}}) // G64-DAG: declare dso_local void @_ZN13ImportMembers7ignoredEv(ptr {{[^,]*}}) public: void ignored(); @@ -246,14 +271,19 @@ struct ImportMembers::Nested { // M32-DAG: declare dllimport x86_thiscallcc void @"?normalInlineDecl@Nested@ImportMembers@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"?normalInlineDecl@Nested@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: define dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local void @_ZN13ImportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local void @_ZN13ImportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested10normalDeclEv(ptr {{[^,]*}}) + // C32-DAG: declare dllimport void @_ZN13ImportMembers6Nested10normalDeclEv(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested10normalDeclEv(ptr {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this) // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInclass@Nested@ImportMembers@@QAEXXZ"( // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInlineDef@Nested@ImportMembers@@QAEXXZ"( @@ -261,6 +291,9 @@ struct ImportMembers::Nested { // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested13normalInclassEv( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested15normalInlineDefEv( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested16normalInlineDeclEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested13normalInclassEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested15normalInlineDefEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested16normalInlineDeclEv( __declspec(dllimport) void normalDef(); // dllimport ignored __declspec(dllimport) void normalDecl(); __declspec(dllimport) void normalInclass() {} @@ -278,14 +311,19 @@ struct ImportMembers::Nested { // M32-DAG: declare dllimport x86_thiscallcc void @"?virtualInlineDecl@Nested@ImportMembers@@UAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"?virtualInlineDecl@Nested@ImportMembers@@UEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: define dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define dso_local void @_ZN13ImportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local void @_ZN13ImportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested11virtualDeclEv(ptr {{[^,]*}}) + // C32-DAG: declare dllimport void @_ZN13ImportMembers6Nested11virtualDeclEv(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested11virtualDeclEv(ptr {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this) // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?virtualInclass@Nested@ImportMembers@@UAEXXZ"( @@ -294,6 +332,9 @@ struct ImportMembers::Nested { // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested14virtualInclassEv( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested16virtualInlineDefEv( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested17virtualInlineDeclEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested14virtualInclassEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested16virtualInlineDefEv( + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested17virtualInlineDeclEv( __declspec(dllimport) virtual void virtualDef(); // dllimport ignored __declspec(dllimport) virtual void virtualDecl(); __declspec(dllimport) virtual void virtualInclass() {} @@ -316,6 +357,9 @@ struct ImportMembers::Nested { // GO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested13staticInclassEv() // GO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested15staticInlineDefEv() // GO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested16staticInlineDeclEv() + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested13staticInclassEv() + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested15staticInlineDefEv() + // CO1-DAG: define linkonce_odr dso_local void @_ZN13ImportMembers6Nested16staticInlineDeclEv() __declspec(dllimport) static void staticDef(); // dllimport ignored __declspec(dllimport) static void staticDecl(); __declspec(dllimport) static void staticInclass() {} @@ -325,6 +369,7 @@ struct ImportMembers::Nested { // M32-DAG: declare dllimport x86_thiscallcc void @"?protectedNormalDecl@Nested@ImportMembers@@IAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"?protectedNormalDecl@Nested@ImportMembers@@IEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(ptr {{[^,]*}} + // C32-DAG: declare dllimport void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(ptr {{[^,]*}} // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(ptr {{[^,]*}}) // MSC-DAG: declare dllimport void @"?protectedStaticDecl@Nested@ImportMembers@@KAXXZ"() // GNU-DAG: declare dllimport void @_ZN13ImportMembers6Nested19protectedStaticDeclEv() @@ -335,6 +380,7 @@ struct ImportMembers::Nested { // M32-DAG: declare dllimport x86_thiscallcc void @"?privateNormalDecl@Nested@ImportMembers@@AAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"?privateNormalDecl@Nested@ImportMembers@@AEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested17privateNormalDeclEv(ptr {{[^,]*}}) + // C32-DAG: declare dllimport void @_ZN13ImportMembers6Nested17privateNormalDeclEv(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested17privateNormalDeclEv(ptr {{[^,]*}}) // MSC-DAG: declare dllimport void @"?privateStaticDecl@Nested@ImportMembers@@CAXXZ"() // GNU-DAG: declare dllimport void @_ZN13ImportMembers6Nested17privateStaticDeclEv() @@ -345,6 +391,7 @@ struct ImportMembers::Nested { // M32-DAG: declare dso_local x86_thiscallcc void @"?ignored@Nested@ImportMembers@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dso_local void @"?ignored@Nested@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested7ignoredEv(ptr {{[^,]*}}) + // C32-DAG: declare dso_local void @_ZN13ImportMembers6Nested7ignoredEv(ptr {{[^,]*}}) // G64-DAG: declare dso_local void @_ZN13ImportMembers6Nested7ignoredEv(ptr {{[^,]*}}) public: void ignored(); @@ -411,36 +458,42 @@ struct ImportSpecials { // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportSpecials@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}}) // M64-DAG: declare dllimport ptr @"??0ImportSpecials@@QEAA@XZ"(ptr {{[^,]*}} returned {{[^,]*}}) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1Ev(ptr {{[^,]*}}) + // C32-DAG: declare dllimport void @_ZN14ImportSpecialsC1Ev(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1Ev(ptr {{[^,]*}}) __declspec(dllimport) ImportSpecials(); // M32-DAG: declare dllimport x86_thiscallcc void @"??1ImportSpecials@@QAE@XZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??1ImportSpecials@@QEAA@XZ"(ptr {{[^,]*}}) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsD1Ev(ptr {{[^,]*}}) + // C32-DAG: declare dllimport void @_ZN14ImportSpecialsD1Ev(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN14ImportSpecialsD1Ev(ptr {{[^,]*}}) __declspec(dllimport) ~ImportSpecials(); // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportSpecials@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport ptr @"??0ImportSpecials@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1ERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) + // C32-DAG: declare dllimport void @_ZN14ImportSpecialsC1ERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1ERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) __declspec(dllimport) ImportSpecials(const ImportSpecials&); // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportSpecials@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportSpecials@@QEAAAEAU0@AEBU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) + // C32-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G64-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) __declspec(dllimport) ImportSpecials& operator=(const ImportSpecials&); // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportSpecials@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport ptr @"??0ImportSpecials@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1EOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) + // C32-DAG: declare dllimport void @_ZN14ImportSpecialsC1EOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1EOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) __declspec(dllimport) ImportSpecials(ImportSpecials&&); // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportSpecials@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSEOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) + // C32-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSEOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G64-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSEOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) __declspec(dllimport) ImportSpecials& operator=(ImportSpecials&&); }; @@ -452,49 +505,61 @@ struct ImportInlineSpecials { // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}}) // M64-DAG: declare dllimport ptr @"??0ImportInlineSpecials@@QEAA@XZ"(ptr {{[^,]*}} returned {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1Ev(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsC1Ev(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsC1Ev(ptr {{[^,]*}} %this) // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE@XZ"( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1Ev( + // CO1-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsC1Ev( __declspec(dllimport) ImportInlineSpecials() {} // M32-DAG: declare dllimport x86_thiscallcc void @"??1ImportInlineSpecials@@QAE@XZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??1ImportInlineSpecials@@QEAA@XZ"(ptr {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsD1Ev(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsD1Ev(ptr {{[^,]*}} %this) // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"??1ImportInlineSpecials@@QAE@XZ"( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev( + // CO1-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsD1Ev( __declspec(dllimport) ~ImportInlineSpecials() {} // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport ptr @"??0ImportInlineSpecials@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE@ABU0@@Z"( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_( + // CO1-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsC1ERKS_( __declspec(dllimport) inline ImportInlineSpecials(const ImportInlineSpecials&); // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QEAAAEAU0@AEBU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QAEAAU0@ABU0@@Z"( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSERKS_( + // CO1-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSERKS_( __declspec(dllimport) ImportInlineSpecials& operator=(const ImportInlineSpecials&); // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport ptr @"??0ImportInlineSpecials@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE@$$QAU0@@Z"( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_( + // CO1-DAG: define linkonce_odr dso_local void @_ZN20ImportInlineSpecialsC1EOS_( __declspec(dllimport) ImportInlineSpecials(ImportInlineSpecials&&) {} // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"( // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSEOS_( + // CO1-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSEOS_( __declspec(dllimport) ImportInlineSpecials& operator=(ImportInlineSpecials&&) { return *this; } }; ImportInlineSpecials::ImportInlineSpecials(const ImportInlineSpecials&) {} @@ -507,49 +572,61 @@ struct ImportDefaulted { // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportDefaulted@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}}) // M64-DAG: declare dllimport ptr @"??0ImportDefaulted@@QEAA@XZ"(ptr {{[^,]*}} returned {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1Ev(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedC1Ev(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedC1Ev(ptr {{[^,]*}} %this) // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportDefaulted@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this) // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1Ev(ptr {{[^,]*}} %this) + // CO1-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedC1Ev(ptr {{[^,]*}} %this) __declspec(dllimport) ImportDefaulted() = default; // M32-DAG: declare dllimport x86_thiscallcc void @"??1ImportDefaulted@@QAE@XZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??1ImportDefaulted@@QEAA@XZ"(ptr {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(ptr {{[^,]*}} %this) + // C32-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedD1Ev(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedD1Ev(ptr {{[^,]*}} %this) // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"??1ImportDefaulted@@QAE@XZ"(ptr {{[^,]*}} %this) // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(ptr {{[^,]*}} %this) + // CO1-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedD1Ev(ptr {{[^,]*}} %this) __declspec(dllimport) ~ImportDefaulted() = default; // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportDefaulted@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport ptr @"??0ImportDefaulted@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportDefaulted@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // CO1-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllimport) ImportDefaulted(const ImportDefaulted&) = default; // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QEAAAEAU0@AEBU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // CO1-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllimport) ImportDefaulted& operator=(const ImportDefaulted&) = default; // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportDefaulted@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport ptr @"??0ImportDefaulted@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportDefaulted@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // CO1-DAG: define linkonce_odr dso_local void @_ZN15ImportDefaultedC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllimport) ImportDefaulted(ImportDefaulted&&) = default; // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // C32-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) + // CO1-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) __declspec(dllimport) ImportDefaulted& operator=(ImportDefaulted&&) = default; ForceNonTrivial v; // ensure special members are non-trivial @@ -586,26 +663,31 @@ __declspec(dllimport) ImportDefaultedDefs::~ImportDefaultedDefs() = default; // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportDefaultedDefs@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport ptr @"??0ImportDefaultedDefs@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN19ImportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define linkonce_odr dso_local void @_ZN19ImportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local void @_ZN19ImportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) inline ImportDefaultedDefs::ImportDefaultedDefs(const ImportDefaultedDefs&) = default; // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaultedDefs@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // M64-DAG: declare dllimport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaultedDefs@@QEAAAEAU0@AEBU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}})) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define linkonce_odr dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) inline ImportDefaultedDefs& ImportDefaultedDefs::operator=(const ImportDefaultedDefs&) = default; // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ImportDefaultedDefs@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define dso_local dllexport ptr @"??0ImportDefaultedDefs@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local x86_thiscallcc void @_ZN19ImportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define dso_local void @_ZN19ImportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local void @_ZN19ImportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local x86_thiscallcc void @_ZN19ImportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define dso_local void @_ZN19ImportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local void @_ZN19ImportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) ImportDefaultedDefs::ImportDefaultedDefs(ImportDefaultedDefs&&) = default; // dllimport ignored // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // M64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G32-DAG: define dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) +// C32-DAG: define dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) // G64-DAG: define dso_local nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) ImportDefaultedDefs& ImportDefaultedDefs::operator=(ImportDefaultedDefs&&) = default; // dllimport ignored @@ -623,24 +705,28 @@ struct ImportAlloc { // M32-DAG: declare dllimport ptr @"??2ImportAlloc@@SAPAXI@Z"(i32) // M64-DAG: declare dllimport ptr @"??2ImportAlloc@@SAPEAX_K@Z"(i64) // G32-DAG: declare dllimport ptr @_ZN11ImportAllocnwEj(i32) -// G64-DAG: declare dllimport ptr @_ZN11ImportAllocnwEy(i64) +// C32-DAG: declare dllimport ptr @_ZN11ImportAllocnwEj(i32) +// G64-DAG: declare dllimport ptr @_ZN11ImportAllocnwE{{[ym]}}(i64) void UNIQ(use)() { new ImportAlloc(); } // M32-DAG: declare dllimport ptr @"??_UImportAlloc@@SAPAXI@Z"(i32) // M64-DAG: declare dllimport ptr @"??_UImportAlloc@@SAPEAX_K@Z"(i64) // G32-DAG: declare dllimport ptr @_ZN11ImportAllocnaEj(i32) -// G64-DAG: declare dllimport ptr @_ZN11ImportAllocnaEy(i64) +// C32-DAG: declare dllimport ptr @_ZN11ImportAllocnaEj(i32) +// G64-DAG: declare dllimport ptr @_ZN11ImportAllocnaE{{[ym]}}(i64) void UNIQ(use)() { new ImportAlloc[1]; } // M32-DAG: declare dllimport void @"??3ImportAlloc@@SAXPAX@Z"(ptr) // M64-DAG: declare dllimport void @"??3ImportAlloc@@SAXPEAX@Z"(ptr) // G32-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(ptr) +// C32-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(ptr) // G64-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(ptr) void UNIQ(use)(ImportAlloc* ptr) { delete ptr; } // M32-DAG: declare dllimport void @"??_VImportAlloc@@SAXPAX@Z"(ptr) // M64-DAG: declare dllimport void @"??_VImportAlloc@@SAXPEAX@Z"(ptr) // G32-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(ptr) +// C32-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(ptr) // G64-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(ptr) void UNIQ(use)(ImportAlloc* ptr) { delete[] ptr; } @@ -660,6 +746,7 @@ struct MemFunTmpl { // M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal@UImplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??$importedNormal@UImplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define linkonce_odr dso_local void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(ptr {{[^,]*}} %this) USEMF(MemFunTmpl, importedNormal) @@ -673,6 +760,7 @@ USE(MemFunTmpl::importedStatic) // M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal@UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??$importedNormal@UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}}) +// C32-DAG: declare dso_local void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}}) // G64-DAG: declare dso_local void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}}) extern template void MemFunTmpl::importedNormal(); USEMF(MemFunTmpl, importedNormal) @@ -688,6 +776,7 @@ USE(MemFunTmpl::importedStatic) // M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal@UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??$importedNormal@UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define weak_odr dso_local void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this) template void MemFunTmpl::importedNormal(); USEMF(MemFunTmpl, importedNormal) @@ -702,6 +791,7 @@ USE(MemFunTmpl::importedStatic) // M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal@UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??$importedNormal@UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}}) +// C32-DAG: declare dllimport void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}}) template<> __declspec(dllimport) void MemFunTmpl::importedNormal(); USEMF(MemFunTmpl, importedNormal) @@ -716,6 +806,7 @@ USEMF(MemFunTmpl, importedNormal) // M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??$importedNormal@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define linkonce_odr dso_local void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this) template<> __declspec(dllimport) inline void MemFunTmpl::importedNormal() {} USEMF(MemFunTmpl, importedNormal) @@ -743,6 +834,7 @@ USE(MemFunTmpl::importedStatic) // M32-DAG: define dso_local x86_thiscallcc void @"??$importedNormal@UExplicitSpec_NotImported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this) // M64-DAG: define dso_local void @"??$importedNormal@UExplicitSpec_NotImported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this) // G32-DAG: define dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define dso_local void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define dso_local void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(ptr {{[^,]*}} %this) template<> void MemFunTmpl::importedNormal() {} USEMF(MemFunTmpl, importedNormal) @@ -758,6 +850,7 @@ USE(MemFunTmpl::importedStatic) // M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef@UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??$normalDef@UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dso_local x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}}) +// C32-DAG: declare dso_local void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}}) // G64-DAG: declare dso_local void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}}) extern template __declspec(dllimport) void MemFunTmpl::normalDef(); USEMF(MemFunTmpl, normalDef) @@ -773,6 +866,7 @@ USE(MemFunTmpl::staticDef) // M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef@UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??$normalDef@UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define weak_odr dso_local void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define weak_odr dso_local void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this) template __declspec(dllimport) void MemFunTmpl::normalDef(); USEMF(MemFunTmpl, normalDef) @@ -787,6 +881,7 @@ USE(MemFunTmpl::staticDef) // M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef@UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??$normalDef@UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}}) +// C32-DAG: declare dllimport void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}}) // G64-DAG: declare dllimport void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}}) template<> __declspec(dllimport) void MemFunTmpl::normalDef(); USEMF(MemFunTmpl, normalDef) @@ -801,6 +896,7 @@ USEMF(MemFunTmpl, normalDef) // M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}}) // M64-DAG: declare dllimport void @"??$normalDef@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}}) // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this) +// C32-DAG: define linkonce_odr dso_local void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this) // G64-DAG: define linkonce_odr dso_local void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this) template<> __declspec(dllimport) inline void MemFunTmpl::normalDef() {} USEMF(MemFunTmpl, normalDef) @@ -888,10 +984,12 @@ template struct ClassTmplMem { // MSVC imports explicit specialization of imported class template member function; MinGW does not. // M32-DAG: declare dllimport x86_thiscallcc void @"?importedNormal@?$ClassTmplMem@H@@QAEXXZ" // G32-DAG: declare dso_local x86_thiscallcc void @_ZN12ClassTmplMemIiE14importedNormalEv +// C32-DAG: declare dso_local void @_ZN12ClassTmplMemIiE14importedNormalEv template<> void ClassTmplMem::importedNormal(); USEMF(ClassTmplMem, importedNormal); // M32-DAG: declare dllimport void @"?importedStatic@?$ClassTmplMem@H@@SAXXZ" // G32-DAG: declare dso_local void @_ZN12ClassTmplMemIiE14importedStaticEv +// C32-DAG: declare dso_local void @_ZN12ClassTmplMemIiE14importedStaticEv template<> void ClassTmplMem::importedStatic(); USEMF(ClassTmplMem, importedStatic); diff --git a/clang/test/CodeGenCXX/dllimport-missing-key.cpp b/clang/test/CodeGenCXX/dllimport-missing-key.cpp index d8ef7aa7ea680..9eb9e7b5bbb0d 100644 --- a/clang/test/CodeGenCXX/dllimport-missing-key.cpp +++ b/clang/test/CodeGenCXX/dllimport-missing-key.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=GNU %s +// RUN: %clang_cc1 -triple i686-pc-cygwin -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=GNU %s class __declspec(dllimport) QObjectData { public: diff --git a/clang/test/CodeGenCXX/dllimport-rtti.cpp b/clang/test/CodeGenCXX/dllimport-rtti.cpp index f23a242c4bedc..046bf5020398d 100644 --- a/clang/test/CodeGenCXX/dllimport-rtti.cpp +++ b/clang/test/CodeGenCXX/dllimport-rtti.cpp @@ -1,5 +1,8 @@ -// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=MSVC -// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU +// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=MSVC +// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU +// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU +// RUN: %clang_cc1 -triple i686-pc-cygwin -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU struct __declspec(dllimport) S { virtual void f() {} diff --git a/clang/test/CodeGenCXX/dllimport.cpp b/clang/test/CodeGenCXX/dllimport.cpp index 484866b45389f..363f97a8d58ee 100644 --- a/clang/test/CodeGenCXX/dllimport.cpp +++ b/clang/test/CodeGenCXX/dllimport.cpp @@ -2,15 +2,18 @@ // RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-msvc -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -DMSABI -w | FileCheck --check-prefix=MSC --check-prefix=M64 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=GNU --check-prefix=G32 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-gnu -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=GNU %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-pc-cygwin -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=GNU --check-prefix=C32 %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-pc-cygwin -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=GNU %s // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc -fno-rtti -fno-threadsafe-statics -fms-extensions -fms-compatibility-version=18.00 -emit-llvm -std=c++1y -O1 -disable-llvm-passes -o - %s -DMSABI -w | FileCheck --check-prefix=MO1 --check-prefix=M18 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc -fno-rtti -fno-threadsafe-statics -fms-extensions -fms-compatibility-version=19.00 -emit-llvm -std=c++1y -O1 -disable-llvm-passes -o - %s -DMSABI -w | FileCheck --check-prefix=MO1 --check-prefix=M19 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O1 -disable-llvm-passes -o - %s -w | FileCheck --check-prefix=GO1 %s -// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-scei-ps4 -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=PS %s -// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-sie-ps5 -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=PS %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-scei-ps4 -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=PS %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-sie-ps5 -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=PS %s // CHECK-NOT doesn't play nice with CHECK-DAG, so use separate run lines. // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -DMSABI -w | FileCheck --check-prefix=MSC2 %s // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=GNU2 %s +// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-pc-cygwin -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -w | FileCheck --check-prefix=GNU2 %s // Helper structs to make templates more expressive. struct ImplicitInst_Imported {}; @@ -205,7 +208,7 @@ USEVAR(VarTmpl) // Functions //===----------------------------------------------------------------------===// -// GNU-DAG: declare dso_local void @_ZdlPv{{j|y}}(ptr, i{{32|64}}) +// GNU-DAG: declare dso_local void @_ZdlPv{{[jym]}}(ptr, i{{32|64}}) // Import function declaration. // MSC-DAG: declare dllimport void @"?decl@@YAXXZ"() @@ -311,7 +314,7 @@ USE(friend5) // Implicit declarations can be redeclared with dllimport. // MSC-DAG: declare dllimport nonnull ptr @"??2@{{YAPAXI|YAPEAX_K}}@Z"( -// GNU-DAG: declare dllimport nonnull ptr @_Znw{{[yj]}}( +// GNU-DAG: declare dllimport nonnull ptr @_Znw{{[yjm]}}( __declspec(dllimport) void* operator new(__SIZE_TYPE__ n); void UNIQ(use)() { ::operator new(42); } @@ -677,6 +680,7 @@ struct __declspec(dllimport) KeyFuncClass { }; extern constexpr KeyFuncClass keyFuncClassVar = {}; // G32-DAG: @_ZTV12KeyFuncClass = external dllimport unnamed_addr constant { [3 x ptr] } +// C32-DAG: @_ZTV12KeyFuncClass = external dllimport unnamed_addr constant { [3 x ptr] } struct __declspec(dllimport) X : public virtual W {}; USECLASS(X) @@ -813,6 +817,7 @@ template struct __declspec(dllimport) PartiallySpecializedClassTemp USEMEMFUNC(PartiallySpecializedClassTemplate, f); // M32-DAG: declare dso_local x86_thiscallcc void @"?f@?$PartiallySpecializedClassTemplate@PAX@@QAEXXZ" // G32-DAG: declare dllimport x86_thiscallcc void @_ZN33PartiallySpecializedClassTemplateIPvE1fEv +// C32-DAG: declare dllimport void @_ZN33PartiallySpecializedClassTemplateIPvE1fEv // Attributes on explicit specializations are honored. template struct ExplicitlySpecializedClassTemplate {}; @@ -820,6 +825,7 @@ template <> struct __declspec(dllimport) ExplicitlySpecializedClassTemplate, f); // M32-DAG: declare dllimport x86_thiscallcc void @"?f@?$ExplicitlySpecializedClassTemplate@PAX@@QAEXXZ" // G32-DAG: declare dllimport x86_thiscallcc void @_ZN34ExplicitlySpecializedClassTemplateIPvE1fEv +// C32-DAG: declare dllimport void @_ZN34ExplicitlySpecializedClassTemplateIPvE1fEv // MS inherits DLL attributes to partial specializations. template struct __declspec(dllimport) PartiallySpecializedImportedClassTemplate {}; @@ -827,6 +833,7 @@ template struct PartiallySpecializedImportedClassTemplate { voi USEMEMFUNC(PartiallySpecializedImportedClassTemplate, f); // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"?f@?$PartiallySpecializedImportedClassTemplate@PAX@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN41PartiallySpecializedImportedClassTemplateIPvE1fEv +// C32-DAG: define linkonce_odr dso_local void @_ZN41PartiallySpecializedImportedClassTemplateIPvE1fEv // Attributes on the instantiation take precedence over attributes on the template. template struct __declspec(dllexport) ExplicitlyInstantiatedWithDifferentAttr { void f() {} }; @@ -842,6 +849,7 @@ USEMEMFUNC(ExplicitInstantiationDeclImportedDefTemplate, f); // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"?f@?$ExplicitInstantiationDeclImportedDefTemplate@H@@QAEXXZ" // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc ptr @"??0?$ExplicitInstantiationDeclImportedDefTemplate@H@@QAE@XZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN44ExplicitInstantiationDeclImportedDefTemplateIiE1fEv +// C32-DAG: define weak_odr dso_local void @_ZN44ExplicitInstantiationDeclImportedDefTemplateIiE1fEv template struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate { void f() {} ExplicitInstantiationDeclExportedDefImportedTemplate() {} }; extern template struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate ; @@ -919,6 +927,7 @@ struct __declspec(dllimport) DerivedFromTemplate : public ClassTemplate {}; USEMEMFUNC(ClassTemplate, func) // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"?func@?$ClassTemplate@H@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ClassTemplateIiE4funcEv +// C32-DAG: define linkonce_odr dso_local void @_ZN13ClassTemplateIiE4funcEv // PS-DAG: declare dllimport void @_ZN13ClassTemplateIiE4funcEv // ImportedTemplate is explicitly imported. @@ -926,6 +935,7 @@ struct __declspec(dllimport) DerivedFromImportedTemplate : public ImportedClassT USEMEMFUNC(ImportedClassTemplate, func) // M32-DAG: declare dllimport x86_thiscallcc void @"?func@?$ImportedClassTemplate@H@@QAEXXZ" // G32-DAG: declare dllimport x86_thiscallcc void @_ZN21ImportedClassTemplateIiE4funcEv +// C32-DAG: declare dllimport void @_ZN21ImportedClassTemplateIiE4funcEv // PS-DAG: declare dllimport void @_ZN21ImportedClassTemplateIiE4funcEv // ExportedTemplate is explicitly exported. @@ -933,6 +943,7 @@ struct __declspec(dllimport) DerivedFromExportedTemplate : public ExportedClassT USEMEMFUNC(ExportedClassTemplate, func) // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?func@?$ExportedClassTemplate@H@@QAEXXZ" // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN21ExportedClassTemplateIiE4funcEv +// C32-DAG: define weak_odr dso_local dllexport void @_ZN21ExportedClassTemplateIiE4funcEv // PS-DAG: define weak_odr dllexport void @_ZN21ExportedClassTemplateIiE4funcEv // Base class already implicitly instantiated without attribute. @@ -941,6 +952,7 @@ struct __declspec(dllimport) DerivedFromTemplateD2 : public ClassTemplate, func) // M32-DAG: declare dllimport x86_thiscallcc void @"?func@?$ClassTemplate@N@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ClassTemplateIdE4funcEv +// C32-DAG: define linkonce_odr dso_local void @_ZN13ClassTemplateIdE4funcEv // PS-DAG: declare dllimport void @_ZN13ClassTemplateIdE4funcEv // MS: Base class already instantiated with dfferent attribute. @@ -949,6 +961,7 @@ struct __declspec(dllimport) DerivedFromTemplateB2 : public ClassTemplate USEMEMFUNC(ClassTemplate, func) // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?func@?$ClassTemplate@_N@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ClassTemplateIbE4funcEv +// C32-DAG: define linkonce_odr dso_local void @_ZN13ClassTemplateIbE4funcEv // PS-DAG: define weak_odr dllexport void @_ZN13ClassTemplateIbE4funcEv // Base class already specialized without dll attribute. @@ -956,6 +969,7 @@ struct __declspec(dllimport) DerivedFromExplicitlySpecializedTemplate : public E USEMEMFUNC(ExplicitlySpecializedTemplate, func) // M32-DAG: define linkonce_odr dso_local x86_thiscallcc void @"?func@?$ExplicitlySpecializedTemplate@H@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN29ExplicitlySpecializedTemplateIiE4funcEv +// C32-DAG: define linkonce_odr dso_local void @_ZN29ExplicitlySpecializedTemplateIiE4funcEv // PS-DAG: define linkonce_odr void @_ZN29ExplicitlySpecializedTemplateIiE4funcEv // Base class alredy specialized with export attribute. @@ -963,6 +977,7 @@ struct __declspec(dllimport) DerivedFromExplicitlyExportSpecializedTemplate : pu USEMEMFUNC(ExplicitlyExportSpecializedTemplate, func) // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?func@?$ExplicitlyExportSpecializedTemplate@H@@QAEXXZ" // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN35ExplicitlyExportSpecializedTemplateIiE4funcEv +// C32-DAG: define dso_local dllexport void @_ZN35ExplicitlyExportSpecializedTemplateIiE4funcEv // PS-DAG: define dso_local dllexport void @_ZN35ExplicitlyExportSpecializedTemplateIiE4funcEv // Base class already specialized with import attribute. @@ -970,6 +985,7 @@ struct __declspec(dllimport) DerivedFromExplicitlyImportSpecializedTemplate : pu USEMEMFUNC(ExplicitlyImportSpecializedTemplate, func) // M32-DAG: declare dllimport x86_thiscallcc void @"?func@?$ExplicitlyImportSpecializedTemplate@H@@QAEXXZ" // G32-DAG: declare dllimport x86_thiscallcc void @_ZN35ExplicitlyImportSpecializedTemplateIiE4funcEv +// C32-DAG: declare dllimport void @_ZN35ExplicitlyImportSpecializedTemplateIiE4funcEv // PS-DAG: declare dllimport void @_ZN35ExplicitlyImportSpecializedTemplateIiE4funcEv // Base class already instantiated without dll attribute. @@ -977,6 +993,7 @@ struct __declspec(dllimport) DerivedFromExplicitlyInstantiatedTemplate : public USEMEMFUNC(ExplicitlyInstantiatedTemplate, func) // M32-DAG: define weak_odr dso_local x86_thiscallcc void @"?func@?$ExplicitlyInstantiatedTemplate@H@@QAEXXZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN30ExplicitlyInstantiatedTemplateIiE4funcEv +// C32-DAG: define weak_odr dso_local void @_ZN30ExplicitlyInstantiatedTemplateIiE4funcEv // PS-DAG: define weak_odr void @_ZN30ExplicitlyInstantiatedTemplateIiE4funcEv // Base class already instantiated with export attribute. @@ -984,6 +1001,7 @@ struct __declspec(dllimport) DerivedFromExplicitlyExportInstantiatedTemplate : p USEMEMFUNC(ExplicitlyExportInstantiatedTemplate, func) // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?func@?$ExplicitlyExportInstantiatedTemplate@H@@QAEXXZ" // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN36ExplicitlyExportInstantiatedTemplateIiE4funcEv +// C32-DAG: define weak_odr dso_local dllexport void @_ZN36ExplicitlyExportInstantiatedTemplateIiE4funcEv // PS-DAG: define weak_odr dllexport void @_ZN36ExplicitlyExportInstantiatedTemplateIiE4funcEv // Base class already instantiated with import attribute. @@ -991,6 +1009,7 @@ struct __declspec(dllimport) DerivedFromExplicitlyImportInstantiatedTemplate : p USEMEMFUNC(ExplicitlyImportInstantiatedTemplate, func) // M32-DAG: declare dllimport x86_thiscallcc void @"?func@?$ExplicitlyImportInstantiatedTemplate@H@@QAEXXZ" // G32-DAG: declare dllimport x86_thiscallcc void @_ZN36ExplicitlyImportInstantiatedTemplateIiE4funcEv +// C32-DAG: declare dllimport void @_ZN36ExplicitlyImportInstantiatedTemplateIiE4funcEv // PS-DAG: declare dllimport void @_ZN36ExplicitlyImportInstantiatedTemplateIiE4funcEv // MS: A dll attribute propagates through multiple levels of instantiation. @@ -1000,6 +1019,7 @@ struct __declspec(dllimport) BottomClass : public MiddleClass { }; USEMEMFUNC(TopClass, func) // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"?func@?$TopClass@H@@QAEXXZ" // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN8TopClassIiE4funcEv +// C32-DAG: define linkonce_odr dso_local void @_ZN8TopClassIiE4funcEv // PS-DAG: declare dllimport void @_ZN8TopClassIiE4funcEv template struct ExplicitInstantiationDeclTemplateBase { void func() {} }; @@ -1009,6 +1029,7 @@ template struct ExplicitInstantiationDeclTemplateBase; USEMEMFUNC(ExplicitInstantiationDeclTemplateBase, func) // M32-DAG: declare dllimport x86_thiscallcc void @"?func@?$ExplicitInstantiationDeclTemplateBase@H@@QAEXXZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN37ExplicitInstantiationDeclTemplateBaseIiE4funcEv +// C32-DAG: define weak_odr dso_local void @_ZN37ExplicitInstantiationDeclTemplateBaseIiE4funcEv // PS-DAG: declare dllimport void @_ZN37ExplicitInstantiationDeclTemplateBaseIiE4funcEv template struct ExplicitInstantiationDeclTemplateBase2 { void func() {} }; @@ -1018,6 +1039,7 @@ template struct __declspec(dllexport) ExplicitInstantiationDeclTemplateBase2, func) // M32-DAG: declare dllimport x86_thiscallcc void @"?func@?$ExplicitInstantiationDeclTemplateBase2@H@@QAEXXZ" // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN38ExplicitInstantiationDeclTemplateBase2IiE4funcEv +// C32-DAG: define weak_odr dso_local void @_ZN38ExplicitInstantiationDeclTemplateBase2IiE4funcEv // PS-DAG: declare dllimport void @_ZN38ExplicitInstantiationDeclTemplateBase2IiE4funcEv namespace pr39496 { diff --git a/clang/test/CodeGenCXX/dso-local-executable.cpp b/clang/test/CodeGenCXX/dso-local-executable.cpp index d021a6a06f0f0..2be6812efc3a5 100644 --- a/clang/test/CodeGenCXX/dso-local-executable.cpp +++ b/clang/test/CodeGenCXX/dso-local-executable.cpp @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -triple x86_64-pc-linux -mrelocation-model static -O1 -disable-llvm-passes -emit-llvm %s -o - | FileCheck --check-prefix=STATIC %s // RUN: %clang_cc1 -triple x86_64-pc-linux -mrelocation-model static -fno-plt -O1 -disable-llvm-passes -emit-llvm %s -o - | FileCheck --check-prefix=NOPLT %s // RUN: %clang_cc1 -triple x86_64-w64-mingw32 -O1 -disable-llvm-passes -emit-llvm %s -o - | FileCheck --check-prefix=MINGW %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -O1 -disable-llvm-passes -emit-llvm %s -o - | FileCheck --check-prefix=MINGW %s // STATIC-DAG: @_ZTV1C = linkonce_odr dso_local unnamed_addr constant // STATIC-DAG: @_ZTS1C = linkonce_odr dso_local constant diff --git a/clang/test/CodeGenCXX/mingw-template-dllexport.cpp b/clang/test/CodeGenCXX/mingw-template-dllexport.cpp index 408a3fd0a77dd..de112d6da53db 100644 --- a/clang/test/CodeGenCXX/mingw-template-dllexport.cpp +++ b/clang/test/CodeGenCXX/mingw-template-dllexport.cpp @@ -1,4 +1,7 @@ // RUN: %clang_cc1 -emit-llvm -triple i686-mingw32 %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -triple x86_64-w64-mingw32 %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -triple i686-pc-cygwin %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -triple x86_64-pc-cygwin %s -o - | FileCheck %s #define JOIN2(x, y) x##y #define JOIN(x, y) JOIN2(x, y) diff --git a/clang/test/CodeGenCXX/rtti-mingw64.cpp b/clang/test/CodeGenCXX/rtti-mingw64.cpp index e0a4607cf28c3..9de280602945d 100644 --- a/clang/test/CodeGenCXX/rtti-mingw64.cpp +++ b/clang/test/CodeGenCXX/rtti-mingw64.cpp @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -triple x86_64-windows-gnu %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin %s -emit-llvm -o - | FileCheck %s + struct A { int a; }; struct B : virtual A { int b; }; B b; diff --git a/clang/test/CodeGenCXX/virt-dtor-key.cpp b/clang/test/CodeGenCXX/virt-dtor-key.cpp index d3b9ab3351518..cd169ab01dc8b 100644 --- a/clang/test/CodeGenCXX/virt-dtor-key.cpp +++ b/clang/test/CodeGenCXX/virt-dtor-key.cpp @@ -1,5 +1,9 @@ -// RUN: %clang_cc1 -triple i386-linux -emit-llvm %s -o - | FileCheck %s -// RUN: %clang_cc1 -triple i386-windows-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-MINGW +// RUN: %clang_cc1 -triple i686-linux -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-MINGW +// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-MINGW +// RUN: %clang_cc1 -triple i686-pc-cygwin -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-MINGW +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-MINGW + // CHECK: @_ZTI3foo ={{.*}} constant // CHECK-MINGW: @_ZTI3foo = linkonce_odr class foo { diff --git a/clang/test/CodeGenCXX/vtable-key-function-ios.cpp b/clang/test/CodeGenCXX/vtable-key-function-ios.cpp index 43abfb62c73a6..b11d0a62a04a6 100644 --- a/clang/test/CodeGenCXX/vtable-key-function-ios.cpp +++ b/clang/test/CodeGenCXX/vtable-key-function-ios.cpp @@ -3,6 +3,8 @@ // RUN: %clang_cc1 %s -triple=x86_64-pc-windows-gnu -emit-llvm -o - | FileCheck -check-prefixes=CHECK,CHECK-MINGW %s // RUN: %clang_cc1 %s -triple=x86_64-pc-windows-gnu -emit-llvm -o - | FileCheck -check-prefix=CHECK-LATE %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-cygwin -emit-llvm -o - | FileCheck -check-prefixes=CHECK,CHECK-MINGW %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-cygwin -emit-llvm -o - | FileCheck -check-prefix=CHECK-LATE %s // The 'a' variants ask for the vtable first. // The 'b' variants ask for the vtable second. diff --git a/clang/test/SemaCXX/dllexport.cpp b/clang/test/SemaCXX/dllexport.cpp index 22d92c30954e8..f503e2fc311d1 100644 --- a/clang/test/SemaCXX/dllexport.cpp +++ b/clang/test/SemaCXX/dllexport.cpp @@ -2,6 +2,8 @@ // RUN: %clang_cc1 -triple x86_64-win32 -fsyntax-only -fms-extensions -verify -std=c++1y -Wunsupported-dll-base-class-template -DMS %s // RUN: %clang_cc1 -triple i686-mingw32 -fsyntax-only -fms-extensions -verify -std=c++1y -Wunsupported-dll-base-class-template -DGNU %s // RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -fms-extensions -verify -std=c++11 -Wunsupported-dll-base-class-template -DGNU %s +// RUN: %clang_cc1 -triple i686-pc-cygwin -fsyntax-only -fms-extensions -verify -std=c++1y -Wunsupported-dll-base-class-template -DGNU %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -fsyntax-only -fms-extensions -verify -std=c++11 -Wunsupported-dll-base-class-template -DGNU %s // RUN: %clang_cc1 -triple i686-windows-itanium -fsyntax-only -fms-extensions -verify -std=c++11 -Wunsupported-dll-base-class-template -DWI %s // RUN: %clang_cc1 -triple x86_64-windows-itanium -fsyntax-only -fms-extensions -verify -std=c++1y -Wunsupported-dll-base-class-template -DWI %s // RUN: %clang_cc1 -triple x86_64-scei-ps4 -fsyntax-only -fdeclspec -verify -std=c++11 -Wunsupported-dll-base-class-template -DPS %s diff --git a/clang/test/SemaCXX/dllimport.cpp b/clang/test/SemaCXX/dllimport.cpp index 996e92f611d3f..b7a1a62b8725b 100644 --- a/clang/test/SemaCXX/dllimport.cpp +++ b/clang/test/SemaCXX/dllimport.cpp @@ -3,6 +3,9 @@ // RUN: %clang_cc1 -triple i686-mingw32 -fsyntax-only -fms-extensions -verify -std=c++1y -Wunsupported-dll-base-class-template -DGNU %s // RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -fms-extensions -verify -std=c++11 -Wunsupported-dll-base-class-template -DGNU %s // RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -fms-extensions -verify -std=c++17 -Wunsupported-dll-base-class-template -DGNU %s +// RUN: %clang_cc1 -triple i686-pc-cygwin -fsyntax-only -fms-extensions -verify -std=c++1y -Wunsupported-dll-base-class-template -DGNU %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -fsyntax-only -fms-extensions -verify -std=c++11 -Wunsupported-dll-base-class-template -DGNU %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -fsyntax-only -fms-extensions -verify -std=c++17 -Wunsupported-dll-base-class-template -DGNU %s // RUN: %clang_cc1 -triple i686-windows-itanium -fsyntax-only -fms-extensions -verify -std=c++11 -Wunsupported-dll-base-class-template -DWI %s // RUN: %clang_cc1 -triple x86_64-windows-itanium -fsyntax-only -fms-extensions -verify -std=c++17 -Wunsupported-dll-base-class-template -DWI %s // RUN: %clang_cc1 -triple x86_64-scei-ps4 -fsyntax-only -fdeclspec -verify -std=c++11 -Wunsupported-dll-base-class-template -DPS %s