// Make sure we emit the MS ABI default ctor closure with PCH.
//
// Test this without pch.
// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include %s -emit-llvm -o - %s | FileCheck %s

// Test with pch.
// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -emit-pch -o %t %s
// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include-pch %t -emit-llvm -o - %s | FileCheck %s

#ifndef HEADER
#define HEADER

struct __declspec(dllexport) Foo {
  enum E { E0 } e;
  Foo(E e = E0) : e(e) {}
};

// Demangles as:
// void Foo::`default constructor closure'(void)
// CHECK: define weak_odr dllexport void @"\01??_FFoo@@QEAAXXZ"(%struct.Foo*{{.*}})
// CHECK:   call %struct.Foo* @"\01??0Foo@@QEAA@W4E@0@@Z"(%struct.Foo* {{.*}}, i32 0)

#else


#endif

Add dllexport default ctor closure PCH regression test for PR31121
Add dllexport default ctor closure PCH regression test for PR31121

Follow up to r287774

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@287793 91177308-0d34-0410-b5e6-96231b3b80d8
