Hi David,

The reason I resolve the context for the retained type while I do not for the 
global variable, is because the “getScope” of the DIType returns a DIScopeRef, 
while the “getScope” of the DIGlobalVariable returns a DIScope.
I have no idea what are the reasons for this difference, but if we decide to 
unify the return value of the getScope, it is a change for another patch.

I will do the changes you suggested in DwarfCompileUnit and upload a new 
version.

Regards,
Amjad

From: David Blaikie [mailto:dblai...@gmail.com]
Sent: Monday, June 29, 2015 19:45
To: reviews+d9760+public+57feba0fe3280...@reviews.llvm.org
Cc: Aboud, Amjad; Eric Christopher; Alexey Bataev; Robinson, Paul; llvm cfe
Subject: Re: [PATCH] Fixed debug info generation for function static variables, 
typedef, and records

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.ab...@intel.com<mailto:amjad.ab...@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/

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to