[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 1 10:41:36 PDT 2017


ABataev added a comment.

In https://reviews.llvm.org/D33735#770333, @rjmccall wrote:

> In https://reviews.llvm.org/D33735#770318, @aaron.ballman wrote:
>
> > In https://reviews.llvm.org/D33735#770296, @ABataev wrote:
> >
> > > In https://reviews.llvm.org/D33735#770288, @aaron.ballman wrote:
> > >
> > > > Can you help me to understand what problem is being solved with this new attribute? Under what circumstances would the first argument be an `ImplicitParamDecl` but not an implicit this or self?
> > >
> > >
> > > For captured regions an outlined function is created, where all parameters are ImplicitParamDecls. And the very first parameter is wrongly treated as 'this' argument of the member function.
> >
> >
> > Ah, thank you! That makes sense to me, but it begs the question: why an attribute rather than a bit on ImplicitParamDecl?
>
>
> I agree: it would make more sense for ImplicitParamDecl to store a Kind that would always be provided at construction.


Ok, will add a field to ImplicitParamDecl, thanks


https://reviews.llvm.org/D33735





More information about the cfe-commits mailing list