Another fix from fixing up D120905
The empty print(Prec) functions added in fixing that breakage need bodies. This is that.
Differential D122740
[demangler] Node precision dumper urnathan on Mar 30 2022, 8:50 AM. Authored by
Details
Another fix from fixing up D120905 The empty print(Prec) functions added in fixing that breakage need bodies. This is that.
Diff Detail
Unit Tests Event TimelineComment Actions Doesn't look simple. This is inside NDEBUG and explicitly writes to stderr, so I'm not sure how to capture that? Comment Actions Ah, I actually just was glancing at a commit that tested a situation like this ( rG9a62d9db2e1f6064e6c20344870f5e9d43a8de43 ) - so it can be/is done by REQUIRES: asserts on a lit test and then checking stderr (possibly/usually by 2>&1 to just collapse stderr and stdout together). I'd expect/hope there is already other test coverage for this general feature that you could extend - or is this whole printing system untested? Comment Actions I cannot see existing tests for this. AFAICT the node dumping machinery is accessible via debugging llvm. So I don't really see how a unittest could test it, nor how one could invoke the compiler to get at it. The only 3 dump member tests I can find in llvm/unittest/... IR/DominatorTreeBatchUpdatesTest.cpp: but they only seem to be checking the dumpers don't crash. Comment Actions Ah, these aren't invoked from any user-accessible codepath (even in an asserts build), fair enough. Thanks! |