[PATCH] D59366: [NewPM][TimePasses] allow -time-passes reporting into a custom stream
Fedor Sergeev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 09:09:28 PDT 2019
fedor.sergeev added a comment.
In D59366#1429333 <https://reviews.llvm.org/D59366#1429333>, @philip.pfaffe wrote:
> Why not default to CreateInfoOutputFile inside of TimePassesHandler if OutputStream is unset? And then have a `setStream(raw_ostream&)` method to change it.
That is purely a chicken/egg issue.
CreateInfoOutputFile creates a new stream and unless we retake the ownership it will be destroyed.
So there are two approaches to set it for TimePasses by default:
- own it in TimePassesHandler (my initial implementation)
- pass the non-owning pointer into the default constructor (requires passing it to StandardInstrumentation first, so not ideal either)
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59366/new/
https://reviews.llvm.org/D59366
More information about the llvm-commits
mailing list