[Reproducers] Flush files to disk periodically

Periodically flush some of the data to disk. Although not perfect, this
helps when the debugger crashes.

llvm-svn: 360286
This commit is contained in:
Jonas Devlieghere 2019-05-08 21:07:19 +00:00
parent da2a317644
commit a1d0efa2e3
2 changed files with 4 additions and 1 deletions

View File

@ -126,6 +126,7 @@ public:
m_os << t;
if (newline)
m_os << '\n';
m_os.flush();
}
const FileSpec &GetFilename() { return m_filename; }

View File

@ -542,7 +542,9 @@ public:
SerializeAll(tail...);
}
void SerializeAll() {}
void SerializeAll() {
m_stream.flush();
}
private:
/// Serialize pointers. We need to differentiate between pointers to