mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
rename GetLibSupportInfoOutputFile -> CreateInfoOutputFile and
have it always return a new stream to simplify clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99874 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -32,8 +32,8 @@
|
||||
#include <cstring>
|
||||
using namespace llvm;
|
||||
|
||||
// GetLibSupportInfoOutputFile - Return a file stream to print our output on.
|
||||
namespace llvm { extern raw_ostream *GetLibSupportInfoOutputFile(); }
|
||||
// CreateInfoOutputFile - Return a file stream to print our output on.
|
||||
namespace llvm { extern raw_ostream *CreateInfoOutputFile(); }
|
||||
|
||||
/// -stats - Command line option to cause transformations to emit stats about
|
||||
/// what they did.
|
||||
@@ -96,7 +96,7 @@ StatisticInfo::~StatisticInfo() {
|
||||
if (Stats.empty()) return;
|
||||
|
||||
// Get the stream to write to.
|
||||
raw_ostream &OutStream = *GetLibSupportInfoOutputFile();
|
||||
raw_ostream &OutStream = *CreateInfoOutputFile();
|
||||
|
||||
// Figure out how long the biggest Value and Name fields are.
|
||||
unsigned MaxNameLen = 0, MaxValLen = 0;
|
||||
@@ -125,9 +125,8 @@ StatisticInfo::~StatisticInfo() {
|
||||
|
||||
}
|
||||
|
||||
OutStream << '\n'; // Flush the output stream...
|
||||
OutStream << '\n'; // Flush the output stream.
|
||||
OutStream.flush();
|
||||
|
||||
if (&OutStream != &outs() && &OutStream != &errs())
|
||||
delete &OutStream; // Close the file.
|
||||
delete &OutStream; // Close the file.
|
||||
}
|
||||
|
Reference in New Issue
Block a user