From 9b2033ac94c234ef7fbdde0a5daf38d9fb1d4aa1 Mon Sep 17 00:00:00 2001 From: Nico Weber <nicolasweber@gmx.de> Date: Thu, 5 May 2016 11:51:22 +0000 Subject: [PATCH] Add a test for PR26076. r262056 accidentally fixed this. Add a test to ensure it doesn't regress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268625 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGenCXX/dllexport.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/CodeGenCXX/dllexport.cpp b/test/CodeGenCXX/dllexport.cpp index b872548b2fb..c839242e43f 100644 --- a/test/CodeGenCXX/dllexport.cpp +++ b/test/CodeGenCXX/dllexport.cpp @@ -933,3 +933,17 @@ template struct __declspec(dllimport) ExplicitInstantiationDeclTemplateBase2<int USEMEMFUNC(ExplicitInstantiationDeclTemplateBase2<int>, func) // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExplicitInstantiationDeclTemplateBase2@H@@QAEXXZ" // G32-DAG: define weak_odr x86_thiscallcc void @_ZN38ExplicitInstantiationDeclTemplateBase2IiE4funcEv + +// PR26076 +struct LayerSelectionBound; +template <typename> struct Selection {}; +typedef Selection<LayerSelectionBound> LayerSelection; +struct LayerImpl; +struct __declspec(dllexport) LayerTreeImpl { + struct __declspec(dllexport) ElementLayers { + LayerImpl *main = nullptr; + }; + LayerSelection foo; +}; +// M32-DAG: define weak_odr dllexport x86_thiscallcc %"struct.LayerTreeImpl::ElementLayers"* @"\01??0ElementLayers@LayerTreeImpl@@QAE@XZ" +// M64-DAG: define weak_odr dllexport %"struct.LayerTreeImpl::ElementLayers"* @"\01??0ElementLayers@LayerTreeImpl@@QEAA@XZ" -- GitLab