[llvm] [JSON][NFC] Move print method out of NDEBUG || DUMP (PR #131639)
Nikolay Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 17 10:40:37 PDT 2025
npanchen wrote:
> I am still not convinced about having this kind of conditional compilation inside a header file (if you do a global search, you will find such an ifdef only in implementation files). However I will let others discuss on this topic, as it may be fine as long as everything works.
Simple grep of `LLVM_ENABLE_DUMP` shows about 55 cases in `llvm/include`. Some of them might not relate to `dump` or `print` methods. The similar one can be is in [`MCAsmMacro`](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/MC/MCAsmMacro.h#L127-L130).
I'm fine to drop the use of the macro if that functionality seems nice-to-have for release build, otherwise it's better to keep it
under if.
https://github.com/llvm/llvm-project/pull/131639
More information about the llvm-commits
mailing list