mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-13 17:20:28 +00:00
move a function into a more logical place in the file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc86c3cfd6
commit
f8df3e011c
@ -52,6 +52,27 @@ namespace {
|
|||||||
cl::Hidden, cl::location(getLibSupportInfoOutputFilename()));
|
cl::Hidden, cl::location(getLibSupportInfoOutputFilename()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetLibSupportInfoOutputFile - Return a file stream to print our output on.
|
||||||
|
raw_ostream *llvm::GetLibSupportInfoOutputFile() {
|
||||||
|
std::string &LibSupportInfoOutputFilename = getLibSupportInfoOutputFilename();
|
||||||
|
if (LibSupportInfoOutputFilename.empty())
|
||||||
|
return &errs();
|
||||||
|
if (LibSupportInfoOutputFilename == "-")
|
||||||
|
return &outs();
|
||||||
|
|
||||||
|
std::string Error;
|
||||||
|
raw_ostream *Result = new raw_fd_ostream(LibSupportInfoOutputFilename.c_str(),
|
||||||
|
Error, raw_fd_ostream::F_Append);
|
||||||
|
if (Error.empty())
|
||||||
|
return Result;
|
||||||
|
|
||||||
|
errs() << "Error opening info-output-file '"
|
||||||
|
<< LibSupportInfoOutputFilename << " for appending!\n";
|
||||||
|
delete Result;
|
||||||
|
return &errs();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static TimerGroup *DefaultTimerGroup = 0;
|
static TimerGroup *DefaultTimerGroup = 0;
|
||||||
static TimerGroup *getDefaultTimerGroup() {
|
static TimerGroup *getDefaultTimerGroup() {
|
||||||
TimerGroup *tmp = DefaultTimerGroup;
|
TimerGroup *tmp = DefaultTimerGroup;
|
||||||
@ -271,27 +292,6 @@ NamedRegionTimer::NamedRegionTimer(const std::string &Name,
|
|||||||
// TimerGroup Implementation
|
// TimerGroup Implementation
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// GetLibSupportInfoOutputFile - Return a file stream to print our output on.
|
|
||||||
raw_ostream *llvm::GetLibSupportInfoOutputFile() {
|
|
||||||
std::string &LibSupportInfoOutputFilename = getLibSupportInfoOutputFilename();
|
|
||||||
if (LibSupportInfoOutputFilename.empty())
|
|
||||||
return &errs();
|
|
||||||
if (LibSupportInfoOutputFilename == "-")
|
|
||||||
return &outs();
|
|
||||||
|
|
||||||
std::string Error;
|
|
||||||
raw_ostream *Result = new raw_fd_ostream(LibSupportInfoOutputFilename.c_str(),
|
|
||||||
Error, raw_fd_ostream::F_Append);
|
|
||||||
if (Error.empty())
|
|
||||||
return Result;
|
|
||||||
|
|
||||||
errs() << "Error opening info-output-file '"
|
|
||||||
<< LibSupportInfoOutputFilename << " for appending!\n";
|
|
||||||
delete Result;
|
|
||||||
return &errs();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void TimerGroup::removeTimer() {
|
void TimerGroup::removeTimer() {
|
||||||
sys::SmartScopedLock<true> L(*TimerLock);
|
sys::SmartScopedLock<true> L(*TimerLock);
|
||||||
if (--NumTimers != 0 || TimersToPrint.empty())
|
if (--NumTimers != 0 || TimersToPrint.empty())
|
||||||
@ -326,7 +326,6 @@ void TimerGroup::removeTimer() {
|
|||||||
// TOTAL line to make the percentages make sense.
|
// TOTAL line to make the percentages make sense.
|
||||||
if (this != DefaultTimerGroup) {
|
if (this != DefaultTimerGroup) {
|
||||||
*OutStream << " Total Execution Time: ";
|
*OutStream << " Total Execution Time: ";
|
||||||
|
|
||||||
*OutStream << format("%5.4f", Total.getProcessTime()) << " seconds (";
|
*OutStream << format("%5.4f", Total.getProcessTime()) << " seconds (";
|
||||||
*OutStream << format("%5.4f", Total.getWallTime()) << " wall clock)\n";
|
*OutStream << format("%5.4f", Total.getWallTime()) << " wall clock)\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user