================ @@ -608,11 +608,16 @@ void CIRGenFunction::emitDecl(const Decl &d) { case Decl::UsingDirective: // using namespace X; [C++] assert(!cir::MissingFeatures::generateDebugInfo()); return; - case Decl::Var: { + case Decl::Var: + case Decl::Decomposition: { const VarDecl &vd = cast<VarDecl>(d); assert(vd.isLocalVarDecl() && "Should not see file-scope variables inside a function!"); emitVarDecl(vd); + if (auto *dd = dyn_cast<DecompositionDecl>(&vd)) + for (BindingDecl *b : dd->bindings()) + if (VarDecl *hd = b->getHoldingVar()) + emitVarDecl(*hd); ---------------- xlauko wrote:
This differs from classic codegen. Can we align here, i.e. introduce `maybeEmitDeferredVarDeclInit` and use the same implementation as `CodeGenFunction::MaybeEmitDeferredVarDeclInit` https://github.com/llvm/llvm-project/pull/151073 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits