[DebugInfo] Switch to using constructor homing (-debug-info-kind=constructor) by default when debug info is enabledConstructor homing reduces the amount of class type info that is emittedby emitti
[DebugInfo] Switch to using constructor homing (-debug-info-kind=constructor) by default when debug info is enabledConstructor homing reduces the amount of class type info that is emittedby emitting conmplete type info for a class only when a constructor forthat class is emitted.This will mainly reduce the amount of duplicate debug info in objectfiles. In Chrome enabling ctor homing decreased total build directory sizesby about 30%.It's also expected that some class types (such as unused classes)will no longer be emitted in the debug info. This is fine, since we wouldn'texpect to need these types when debugging.In some cases (e.g. libc++, https://reviews.llvm.org/D98750), classesare used without calling the constructor. Since this is technicallyundefined behavior, enabling constructor homing should be fine.However Clang now has an attribute`__attribute__((standalone_debug))` that can be used on classes toignore ctor homing.Bug: https://bugs.llvm.org/show_bug.cgi?id=46537Differential Revision: https://reviews.llvm.org/D106084
show more ...
Revert "Switch to using -debug-info-kind=constructor as default (from =limited)"This reverts commit 227db86a1b7dd6f96f7df14890fcd071bc4fe1f5.Causing debug info errors in google3 LTO builds; also
Revert "Switch to using -debug-info-kind=constructor as default (from =limited)"This reverts commit 227db86a1b7dd6f96f7df14890fcd071bc4fe1f5.Causing debug info errors in google3 LTO builds; also causes adebuginfo-test failure.
Switch to using -debug-info-kind=constructor as default (from =limited)Summary:-debug-info-kind=constructor reduces the amount of class debug info thatis emitted; this patch switches to using thi
Switch to using -debug-info-kind=constructor as default (from =limited)Summary:-debug-info-kind=constructor reduces the amount of class debug info thatis emitted; this patch switches to using this as the default.Constructor homing emits the complete type info for a class only when theconstructor is emitted, so it is expected that there will be some classes thatare not defined in the debug info anymore because they are never constructed,and we shouldn't need debug info for these classes.I compared the PDB files for clang, and there are 273 class types that are defined with `=limited`but not with `=constructor` (out of ~60,000 total class types).We've looked at a number of the types that are no longer defined with =constructor. The vastmajority of cases are something like class A is used as a parameter in a member function ofsome other class B, which is emitted. But the function that uses class A is never called, and class Ais never constructed, and therefore isn't emitted in the debug info.Bug: https://bugs.llvm.org/show_bug.cgi?id=46537Subscribers: aprantl, cfe-commits, lldb-commitsTags: #clang, #lldbDifferential Revision: https://reviews.llvm.org/D79147
[lldb][PDB] Constexpr static member values as AST literalsSummary:When evaluating an expression referencing a constexpr static member variable, anerror is issued because the PDB does not specify
[lldb][PDB] Constexpr static member values as AST literalsSummary:When evaluating an expression referencing a constexpr static member variable, anerror is issued because the PDB does not specify a symbol with an address thatcan be relocated against.Rather than attempt to resolve the variable's value within the IR execution, thevalues of all constants can be looked up and incorporated into the AST of therecord type as a literal, mirroring the original compiler AST.This change applies to DIA and native PDB loaders.Patch By: jackoalanReviewers: aleksandr.urakov, jasonmolenda, zturner, jdoerfert, teemperorReviewed By: aleksandr.urakovSubscribers: sstefan1, lldb-commits, llvm-commits, #lldbTags: #lldb, #llvmDifferential Revision: https://reviews.llvm.org/D82160
Re-land "[test] Split LLDB tests into API, Shell & Unit"The original patch got reverted because it broke `check-lldb` on a cleanbuild. This fixes that.llvm-svn: 374201
Revert [test] Split LLDB tests into API, Shell & Unitas it appears to have broken check-lldb.This reverts r374184 (git commit 22314179f0660c172514b397060fd8f34b586e82)llvm-svn: 374187
[test] Split LLDB tests into API, Shell & UnitLLDB has three major testing strategies: unit tests, tests that exercisethe SB API though dotest.py and what we currently call lit tests. Thelater is
[test] Split LLDB tests into API, Shell & UnitLLDB has three major testing strategies: unit tests, tests that exercisethe SB API though dotest.py and what we currently call lit tests. Thelater is rather confusing as we're now using lit as the driver for allthree types of tests. As most of this grew organically, the directorystructure in the LLDB repository doesn't really make this clear.The 'lit' tests are part of the root and among these tests there's aUnit and Suite folder for the unit and dotest-tests. This layout makesit impossible to run just the lit tests.This patch changes the directory layout to match the 3 testingstrategies, each with their own directory and their own configurationfile. This means there are now 3 directories under lit with 3corresponding targets: - API (check-lldb-api): Test exercising the SB API. - Shell (check-lldb-shell): Test exercising command line utilities. - Unit (check-lldb-unit): Unit tests.Finally, there's still the `check-lldb` target that runs all three testsuites.Finally, this also renames the lit folder to `test` to match the LLVMrepository layout.Differential revision: https://reviews.llvm.org/D68606llvm-svn: 374184