[llvm] [JSON][NFC] Move print method out of NDEBUG || DUMP (PR #131639)

Michele Scuttari via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 17 13:46:41 PDT 2025


mscuttari wrote:

> Well, I don't think naming matters here. What matters is that `void dump(raw_ostream &OS) const;` is defined in cpp file, i.e. including `MCAsmMacro.h` in debug build and linking with a release LLVM would be the same problem, right ?

Right, I've tried and indeed that is also problematic, I guess I have been just lucky up until now not to have ever stumbled across this problem. Imho that and similar headers should also be fixed (maybe by moving the implementation of `dump()` away from the header file?). Requiring downstream users to match the build type seems exaggerated to me, especially considering the size of the project. Unless I'm missing out on something, of course.

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


More information about the llvm-commits mailing list