diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-15 01:33:41 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-15 01:33:41 +0000 |
commit | da383637848d8583f8fcf3c7ab6323cd32edb4d1 (patch) | |
tree | 4d885c0a704da0aa65c224977143657e01329285 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 5ec9c58f1394e1232972604d765238594d48fce1 (diff) | |
download | bcm5719-llvm-da383637848d8583f8fcf3c7ab6323cd32edb4d1.tar.gz bcm5719-llvm-da383637848d8583f8fcf3c7ab6323cd32edb4d1.zip |
P0217R3: code generation support for decomposition declarations.
llvm-svn: 278642
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 888af29d403..f20baab784b 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<VarDecl>(D)); + if (auto *DD = dyn_cast<DecompositionDecl>(D)) + for (auto *B : DD->bindings()) + if (auto *HD = B->getHoldingVar()) + EmitGlobal(HD); break; // Indirect fields from global anonymous structs and unions can be |