From da383637848d8583f8fcf3c7ab6323cd32edb4d1 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 15 Aug 2016 01:33:41 +0000 Subject: P0217R3: code generation support for decomposition declarations. llvm-svn: 278642 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 888af29..f20baab 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3772,6 +3772,10 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { return; case Decl::VarTemplateSpecialization: EmitGlobal(cast(D)); + if (auto *DD = dyn_cast(D)) + for (auto *B : DD->bindings()) + if (auto *HD = B->getHoldingVar()) + EmitGlobal(HD); break; // Indirect fields from global anonymous structs and unions can be -- cgit v1.1