rnk added a comment. Check out https://bugs.llvm.org/show_bug.cgi?id=34070, I wanted to push as much of this down into FileOutputBuffer and ToolOutputFile as possible and reduce our reliance on RemoveFileOnSignal, but I'm not actively working on it. https://reviews.llvm.org/D39710