[clang] [llvm] [DebugInfo] Emit DW_AT_const_value for constexpr array static members (PR #182442)
Shivam Kunwar via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 21 09:02:14 PST 2026
phyBrackets wrote:
> > On an actual LLVM source file (CommandLine.cpp), the diff is literally zero, no constexpr array static members, no cost.
>
> It would be more interesting to see how this change affects an existing, larger codebase. Could you compare the debug info size of the bin/clang binary built with vs without your change?
Alright so built clang with `RelWithDebInfo` and compared the full binary with and without the patch:
```
bloaty clang-after -- clang-before -d sections
FILE SIZE VM SIZE
-------------- --------------
+0.0% +36.7Ki [ = ] 0 .debug_info
+0.0% +57.2Ki +0.0% +2.14Ki TOTAL
```
36.7KB of debug_info growth across the entire clang binary, rounding to +0.0%. The .text increase (~2KB) is from the new codegen in the two source files touched by the patch. Practically that seems like no measurable impact on debug info size.
https://github.com/llvm/llvm-project/pull/182442
More information about the cfe-commits
mailing list