OFStream should have a virtual destructor.

I noticed that using --print-opt-code was producing output unreliably.
Upon investigation, it turns out OFStream's destructor was not marked
virtual. Fixing this fixes the problem, as ostream flushes at destruction.

BUG=

Review URL: https://codereview.chromium.org/1503383003

Cr-Commit-Position: refs/heads/master@{#32688}
This commit is contained in:
mtrofin 2015-12-08 20:34:05 -08:00 committed by Commit bot
parent f245717d9b
commit 42963f41ba

View File

@ -36,7 +36,7 @@ class OFStreamBase : public std::streambuf {
class OFStream : public std::ostream {
public:
explicit OFStream(FILE* f);
~OFStream();
virtual ~OFStream();
private:
OFStreamBase buf_;