sdesmalen added inline comments.
================ Comment at: lib/CodeGen/CGDebugInfo.h:474 + CGBuilderTy &Builder, + llvm::Metadata **MetadataDecl = nullptr); ---------------- aprantl wrote: > same here. Why not just use a return value? Initially I thought it would make more sense for the EmitDeclare function to return the actual call instruction to llvm.dbg.declare, but I see that returning DILocalVariable* makes more sense and that this is in line with the other methods of this class. ================ Comment at: lib/CodeGen/CGDecl.cpp:990 + D.getLocation(), D.getLocation(), &NameIdent, QT, + getContext().CreateTypeSourceInfo(QT), SC_Auto); + ---------------- aprantl wrote: > I think it does, but can you assert me that this generates the same code with > and without -g ? I'm not really sure what you mean with 'generates the same code', because without -g this function is not invoked? However, this function only affects debug information, not anything else related to the actual creation of the VLA. So without -g, no 'dbg.declare()' or corresponding DILocalVariables are generated for each subexpression of each dimension. https://reviews.llvm.org/D41698 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits