[Lldb-commits] [PATCH] D68130: [lldb] Don't emit artificial constructor declarations as global functions

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 27 15:00:42 PDT 2019


shafik added a comment.

In D68130#1686549 <https://reviews.llvm.org/D68130#1686549>, @jingham wrote:

> ....
>  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.


That makes sense and it holds up to some basic experiments.

@teemperor you should add a detailed comment to note that is why we skip artificial memebers.

This is a quick examples where it does not generate the constructor:

  struct Foo {
    // Triggers that we emit an artificial constructor for Foo.
    virtual ~Foo() = default;
  };
  
  void f( Foo &f) {
  }


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

https://reviews.llvm.org/D68130





More information about the lldb-commits mailing list