[llvm] [llvm-debuginfo-analyzer] Use `LLVM_BUILD_DEBUG` in class definitions (PR #140265)

Javier Lopez-Gomez via llvm-commits llvm-commits at lists.llvm.org
Mon May 19 03:23:34 PDT 2025


jalopezg-git wrote:

> Oh, the issue is these aren't checks? They're only for debug dumping features? That is a bit awkward. Do they have to be ABI breaking to provide debugging features/could they be implemented in some other way? (& I don't think we enable dump functions based on whether it's a debug build, right? There's some separate macro for that?)

Usually `dump()` functions are kept in most (all?) other LLVM sub-projects, e.g. in Clang and MLIR.  We could perhaps do the same without too much penalty.

However, here there is also `LVObject::ID`, which is only used for debugging, AFAIU.  There's also a size concern (that all `LVObject` should be kept to minimum size), and this data member is not needed in non-Debug builds.

Yep, we could also raise a thread on Discourse for further discussion :+1:.

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


More information about the llvm-commits mailing list