Author: rnk Date: Wed Nov 23 12:33:54 2016 New Revision: 287793 URL: http://llvm.org/viewvc/llvm-project?rev=287793&view=rev Log: Add dllexport default ctor closure PCH regression test for PR31121
Follow up to r287774 Added: cfe/trunk/test/PCH/dllexport-default-arg-closure.cpp Added: cfe/trunk/test/PCH/dllexport-default-arg-closure.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/dllexport-default-arg-closure.cpp?rev=287793&view=auto ============================================================================== --- cfe/trunk/test/PCH/dllexport-default-arg-closure.cpp (added) +++ cfe/trunk/test/PCH/dllexport-default-arg-closure.cpp Wed Nov 23 12:33:54 2016 @@ -0,0 +1,26 @@ +// 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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits