jingham added a comment.

In D68130#1686530 <https://reviews.llvm.org/D68130#1686530>, @shafik wrote:

> So if I look at `ClangASTContext::AddMethodToCXXRecordType(...)` it has the 
> following:
>
>   if (is_artificial)
>     return nullptr; // skip everything artificial
>   
>
> but why? if I look at the godbolt w/ an AST dump 
> <https://godbolt.org/z/P2LjLM> it is not creating as a global function and it 
> would seem that we would want this behavior as well.


IIRC, it is because we can't count on which artificial functions get generated 
in the debug information in any given CU.  It depends on what gets used.  If we 
write artificial functions into the AST it makes it harder to unique instances 
of the class.  And it doesn't matter whether we do or not because the compiler 
will generate them into the Scratch Context when it needs them.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68130/new/

https://reviews.llvm.org/D68130



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to