[clang] [clang][DebugInfo] Add inlined subprogram metadata for compiler built-ins (PR #189969)

J. Ryan Stinnett via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 20 03:45:33 PDT 2026


jryans wrote:

For those wondering about the debug info size change, here's a size diff when compiling recent Clang on Linux at `-O2 -g`:

```
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.4% +3.28Mi  [ = ]       0    .debug_info
  +2.0%  +954Ki  [ = ]       0    .debug_addr
  +0.7%  +731Ki  [ = ]       0    .debug_line
  +0.2% +62.7Ki  [ = ]       0    .debug_rnglists
  +0.4% +44.2Ki  [ = ]       0    .debug_abbrev
  +0.0% +25.6Ki  [ = ]       0    .debug_loclists
  +0.0% +23.1Ki  [ = ]       0    .debug_str_offsets
   +28% +1.31Ki  [ = ]       0    [Unmapped]
  -0.0%     -81  [ = ]       0    .debug_line_str
  -0.0%    -128  -0.0%    -128    .text
  -0.0% -1.19Ki  -0.0% -1.19Ki    .rodata
  -0.0% -5.90Ki  [ = ]       0    .debug_str
  +0.3% +5.07Mi  -0.0% -1.31Ki    TOTAL
```

It's not a huge increase (in my opinion), but I suppose it probably stacks up at scale...? I'll plan to add a default-enabled flag to turn this off for those who want to tune debug info space usage.

https://github.com/llvm/llvm-project/pull/189969


More information about the cfe-commits mailing list