In clang cc1as_main, when the output file type is “asm”, AsmStreamer owns a formatted_raw_ostream which has a reference to FDOS (raw_ostream), so AsmStreamer must be closed before FDOS is closed. llvm-svn: 243085