[PATCH] D41698: [DebugInfo] Enable debug information for C99 VLA types

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 30 10:03:36 PST 2018


aprantl added inline comments.


================
Comment at: lib/CodeGen/CGDecl.cpp:990
+          D.getLocation(), D.getLocation(), &NameIdent, QT,
+          getContext().CreateTypeSourceInfo(QT), SC_Auto);
+
----------------
sdesmalen wrote:
> 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.
What I meant is that regardless of code being compile with or without -g, the .text section of the resulting binary is identical.


https://reviews.llvm.org/D41698





More information about the cfe-commits mailing list