This patch adds an option to limit debug info by only emitting complete class
type information when its constructor is emitted. This applies to classes
that have nontrivial user defined constructors.
I implemented the option by adding another level to DebugInfoKind, and
a flag -flimit-debug-info-constructor.
Total object file size on Windows, compiling with RelWithDebInfo:
before: 4,257,448 kb after: 2,104,963 kb
And on Linux
before: 9,225,140 kb after: 4,387,464 kb
According to the Windows clang.pdb files, here is a list of types that are no
longer complete with this option enabled: https://reviews.llvm.org/P8182
Could you commit (the pre-patch equivalent) of this change now/before your patch - it'll simplify the diff/make it easier to review.
Though I think the name needs some massaging, since it doesn't return "getDebugInfo() == codegenoptions::FullDebugInfo", so the name's a bit misleading.
/maybe/ (but honestly I don't have any great names) "hasVariableAndTypeDebugInfo" though that's a bit of a mouthful.