Since r293359, most dump() function are only defined when
!defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) holds. print() functions
only used by dump() functions are now unused in release builds,
generating lots of warnings. This patch only defines some print()
functions if they are used.
Details
Diff Detail
Event Timeline
This patch also adds guards for a few functions not used by dump(), but only inside DEBUG(). I could split them off if that's preferred.
So I guess those print() functions are not publicly accessible (I guess we wouldn't warn about them otherwise). If the print functions aren't used otherwise, then why not merge them into the dump() functions?
I think it shouldn't be to hard to fold the print() functions into the dump() functions in most cases. I could update the patch. The only benefit of having those print functions would be debugging, in the rare case someone wants to print to a different stream then stderr.
Thanks for having a look. Committed as is because some print functions are used in implementations of
raw_ostream &operator<<(raw_ostream &OS, const X &X), which in turn are used in DEBUG()
lib/CodeGen/LiveDebugVariables.cpp | ||
---|---|---|
354 | Since this is only called when NDEBUG is not defined, #ifndef NDEBUG should be moved here to fix buildbot failures. |
lib/CodeGen/LiveDebugVariables.cpp | ||
---|---|---|
354 | I'll fix that, thanks |
Since this is only called when NDEBUG is not defined, #ifndef NDEBUG should be moved here to fix buildbot failures.