Functions used only in assert cause warnings in release mode
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks for addressing this issue! Would this work if we compiled in release mode and with asserts enabled?
Comment Actions
Would this work if we compiled in release mode and with asserts enabled?
Yes: the way asserts are enabled is by defining -DNDEBUG.
Comment Actions
We also have an attribute which may be nicer than the macro: https://github.com/llvm/llvm-project/blob/main/mlir/lib/Transforms/Utils/LoopUtils.cpp#L1509