> On Feb 24, 2015, at 5:12 PM, David Blaikie <[email protected]> wrote:
> 
> 
> 
> On Tue, Feb 24, 2015 at 4:59 PM, Saleem Abdulrasool <[email protected] 
> <mailto:[email protected]>> wrote:
> REPOSITORY
>   rL LLVM
> 
> ================
> Comment at: lib/CodeGen/CGDebugInfo.cpp:2379-2382
> @@ -2378,4 +2378,6 @@
>    // we have support for emitting declarations of (non-member) global 
> variables.
> -  VDContext = getContextDescriptor(
> -      dyn_cast<Decl>(VD->isStaticDataMember() ? VD->getLexicalDeclContext()
> -                                              : VD->getDeclContext()));
> +  const DeclContext *DC = VD->isStaticDataMember() ? 
> VD->getLexicalDeclContext()
> +                                                   : VD->getDeclContext();
> +  while (DC->isRecord())
> +    DC = DC->getParent();
> +  VDContext = getContextDescriptor(dyn_cast<Decl>(DC));
> ----------------
> friss wrote:
> > The message makes it look like this change addresses a very particular case 
> > related to dllexport, yet the logic makes no mention of it. Care to 
> > elaborate why this doesn't change anything is other cases?
> The dllexport simply makes it easier to expose the issue as the member will 
> be forcefully instantiated, and thus force the materialization of the debug 
> info.
> 
> You reckon this behavior could be tickled without dllexport? I think in any 
> other case you'd need an explicit external definition - only in dllexport 
> have I seen a definition manifested without one written outside the class.

That’s what I was inferring from the fact that no other test needed to be 
updated. I think a comment pointing out that this happens only in very specific 
cases would be nice.

Fred

>  
> 
> http://reviews.llvm.org/D7872 <http://reviews.llvm.org/D7872>
> 
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/ 
> <http://reviews.llvm.org/settings/panel/emailpreferences/>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to