This patch adds BlockPrinter-- a small wrapper for printing CFG nodes and DomTree nodes to raw_ostream. It is meant to be only used internally, for debugging and printing errors.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This is not your fault but it would be awesome if we introduced a common error handling for the dom, so that we can just call that routine which also calls flush.
(that way we don't have to repeat flush all over the place). Maybe in a separate patch.
Comment Actions
it just needs to be a static helper, nothing fancy, just to reduce the amount of os.flush() typing :)
see, e.g. r299551 (except that you need to call os.flush() and this routine actually returns.
This doesn't print blocks, it print block names.
I'd go with BlockNamePrinter.