peterjc123 updated this revision to Diff 366393.
peterjc123 added a comment.
Add test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108021/new/
https://reviews.llvm.org/D108021
Files:
clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp
Index: clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp
===================================================================
--- clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp
+++ clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++14 \
+// RUN: -fno-threadsafe-statics -fms-extensions -O1 -mconstructor-aliases \
+// RUN: -disable-llvm-passes -o - %s -w -fms-compatibility-version=19.00 | \
+// RUN: FileCheck %s
+
+struct HasDtor {
+ ~HasDtor();
+ int o;
+};
+struct HasImplicitDtor1 { HasDtor o; };
+struct __declspec(dllexport) CtorClosureOuter {
+ struct __declspec(dllexport) CtorClosureInner {
+ CtorClosureInner(const HasImplicitDtor1 &v = {}) {}
+ };
+};
+
+// CHECK-LABEL: define weak_odr dso_local dllexport x86_thiscallcc void
@"??_FCtorClosureInner@CtorClosureOuter@@QAEXXZ"({{.*}}) {{#[0-9]+}} comdat
+// CHECK-LABEL: $"??1HasImplicitDtor1@@QAE@XZ" = comdat any
Index: clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp
===================================================================
--- clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp
+++ clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++14 \
+// RUN: -fno-threadsafe-statics -fms-extensions -O1 -mconstructor-aliases \
+// RUN: -disable-llvm-passes -o - %s -w -fms-compatibility-version=19.00 | \
+// RUN: FileCheck %s
+
+struct HasDtor {
+ ~HasDtor();
+ int o;
+};
+struct HasImplicitDtor1 { HasDtor o; };
+struct __declspec(dllexport) CtorClosureOuter {
+ struct __declspec(dllexport) CtorClosureInner {
+ CtorClosureInner(const HasImplicitDtor1 &v = {}) {}
+ };
+};
+
+// CHECK-LABEL: define weak_odr dso_local dllexport x86_thiscallcc void @"??_FCtorClosureInner@CtorClosureOuter@@QAEXXZ"({{.*}}) {{#[0-9]+}} comdat
+// CHECK-LABEL: $"??1HasImplicitDtor1@@QAE@XZ" = comdat any
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits