[PATCH] Fixed debug info generation for function static variables, typedef, and records

David Blaikie dblaikie at gmail.com
Mon Jun 29 09:45:23 PDT 2015


Do you need to resolve the Context in the retained types iteration? If it's
a lexical block it shouldn't ever be a scope ref, I think? Not sure.

(mostly I'm just concerned aobut the inconsistency between that case and
the global variable case above)

In DwarfCompileUnit - perhaps:

  auto LocalDeclNodeRangeForScope = DD->findLocalDeclNodesForScope(DS);

could be changed to:

  iterator_range<LocalDeclMap::const_iterator> LocalDeclNodeRangeForScope;
  if (!includeMinimalInlineScopes())
    LocalDeclNodeRangeForScope = DD->findLocalDeclNodesForScope(DS);

Then you can drop the includeMinimalInlineScopes() condition from the
following if and the if around the for loop furtehr down, I think? (with
the caveat that I'm not sure if iterator_range is guaranteed (or can be
guaranteed) to produce an empty range - not sure if two default constructed
iterators are guaranteed/meant to be equal to each other - could check the
spec, etc)

- David

On Mon, Jun 29, 2015 at 12:18 AM, Amjad Aboud <amjad.aboud at intel.com> wrote:

> Updated the LLVM version to 240902 (close to top of trunk preparing for
> commit).
>
>
> http://reviews.llvm.org/D9760
>
> Files:
>   lib/CodeGen/CGDebugInfo.cpp
>   lib/CodeGen/CGDebugInfo.h
>   lib/CodeGen/CGDecl.cpp
>   test/CodeGenCXX/debug-info-lb-class.cpp
>   test/CodeGenCXX/debug-info-lb-static.cpp
>   test/CodeGenCXX/debug-info-lb-static2.cpp
>   test/CodeGenCXX/debug-info-lb-typedef.cpp
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150629/70d13878/attachment.html>


More information about the cfe-commits mailing list