[clang] Cleanup ASTContext before output files in crash recovery for modules
When we recover from a crash in a module compilation thread, we need to ensure any output streams owned by the ASTConsumer (e.g. in RawPCHContainerGenerator) are deleted before we call clearOutputFiles(). This has the same theoretical issues with proxy streams that Duncan discusses in the commit 2d133867. In practice, this was observed as a use-after-free crash on a downstream branch that uses such a proxy stream in this code path. Add an assertion so it won't regress. Differential Revision: https://reviews.llvm.org/D129220 rdar://96525032
Loading
Please sign in to comment