Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / PCH / dllexport-default-arg-closure.cpp
blobb5ac7815b8111c7e19fcbe6e0a950ffff2709a85
1 // Make sure we emit the MS ABI default ctor closure with PCH.
2 //
3 // Test this without pch.
4 // RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include %s -emit-llvm -o - %s | FileCheck %s
6 // Test with pch.
7 // RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -emit-pch -o %t %s
8 // RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include-pch %t -emit-llvm -o - %s | FileCheck %s
10 #ifndef HEADER
11 #define HEADER
13 struct __declspec(dllexport) Foo {
14 enum E { E0 } e;
15 Foo(E e = E0) : e(e) {}
18 // Demangles as:
19 // void Foo::`default constructor closure'(void)
20 // CHECK: define weak_odr dso_local dllexport void @"??_FFoo@@QEAAXXZ"(ptr{{.*}})
21 // CHECK: call noundef ptr @"??0Foo@@QEAA@W4E@0@@Z"(ptr {{.*}}, i32 noundef 0)
23 #else
26 #endif