fix: stop emitting .debug_pubnames and .debug_pubtypes

`.debug_pubnames` and `.debug_pubtypes` are poorly designed and people
seldom use them. However, they take a considerable portion of size in
the final binary. This tells LLVM stop emitting those sections on
DWARFv4 or lower. DWARFv5 use `.debug_names` which is more concise
in size and performant for name lookup.
This commit is contained in:
Weihang Lo 2023-11-15 23:07:37 -05:00
parent a2d328fa12
commit 1667f3d2cc
No known key found for this signature in database
GPG key ID: D7DBF189825E82E7
4 changed files with 44 additions and 5 deletions

View file

@ -20,5 +20,5 @@ pub struct X;
// CHECK-NOT: .short 2
// CHECK-NOT: .short 5
// CHECK: .short 4
// CHECK: .section .debug_pubnames
// CHECK: .section .debug_pubtypes
// CHECK-NOT: .section .debug_pubnames
// CHECK-NOT: .section .debug_pubtypes