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:
parent
f245717d9b
commit
42963f41ba
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user