[clang] [llvm] [clang][LLVM Demangler] Add an assertion that validates that all mang… (PR #111391)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 8 01:38:50 PDT 2024
ilya-biryukov wrote:
Sorry for jumping in late.
I think Erich is on point that having a flag that controls an assertion is a bit of a red flag as we are mixing build configuration and runtime configuration.
It is at least unusual and may cause confusion.
After thinking about this a bit more, should we maybe go all-in on one of the approaches?
- either use build configuration: add a new build flag that controls this assertion. Only assert when assertions are enabled and the new build flag is defined.
- or use runtime configure always, e.g. add diagnostics for names that can't be demangled. It should make finding those issues much easier (one can run the compiler to produce a list of names that can't be demangled with locations pointing at code that helps to identify where those names come from).
I would probably vouch for the second approach. The only downside that I see is that we have to explore the warning flag to users (right?) and this is something that should be internal (-cc1).
What do people think of that proposal?
https://github.com/llvm/llvm-project/pull/111391
More information about the cfe-commits
mailing list