[llvm] [pdb] Provide a better error message when overflowing the public/global symbol record stream (PR #140884)

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed May 21 08:56:12 PDT 2025


zmodem wrote:

> I wonder if we should hint at any way to resolve the problem? I am not sure I would know what to do when this happen and end up on this Pull Request after some research :)

I don't think there's room for much info into the error message, but we can certainly put some notes here.

- This kind of overflow is likely due to a huge amount of function template instantiations which would go away if inlined. So if compiling with `-O1` or higher is an option, that would be the best solution. If that's not an option, but the user controls the source code, applying `force_inline` attributes to common templates may be an alternative.
- For PDB size problems other than publics/globals, there are flags to reduce the amount of debug info, such as `-gline-tables-only`
- If the above doesn't help, it may be necessary to split the binary into multiple .exe/.dll files.

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


More information about the llvm-commits mailing list