//===----------------------------------------------------------------------===//
#include "llvm/Support/Timer.h"
//===----------------------------------------------------------------------===//
#include "llvm/Support/Timer.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Mutex.h"
// compensate for this, the test-suite Makefiles have code to delete the
// info output file before running commands which write to it.
std::string Error;
// compensate for this, the test-suite Makefiles have code to delete the
// info output file before running commands which write to it.
std::string Error;
- raw_ostream *Result =
- new raw_fd_ostream(OutputFilename.c_str(), Error, sys::fs::F_Append);
+ raw_ostream *Result = new raw_fd_ostream(
+ OutputFilename.c_str(), Error, sys::fs::F_Append | sys::fs::F_Text);
//===----------------------------------------------------------------------===//
void Timer::init(StringRef N) {
//===----------------------------------------------------------------------===//
void Timer::init(StringRef N) {
Name.assign(N.begin(), N.end());
Started = false;
TG = getDefaultTimerGroup();
Name.assign(N.begin(), N.end());
Started = false;
TG = getDefaultTimerGroup();
//===----------------------------------------------------------------------===//
// TimerGroup Implementation
//===----------------------------------------------------------------------===//
// TimerGroup Implementation
/// TimerGroupList - This is the global list of TimerGroups, maintained by the
/// TimerGroup ctor/dtor and is protected by the TimerLock lock.
/// TimerGroupList - This is the global list of TimerGroups, maintained by the
/// TimerGroup ctor/dtor and is protected by the TimerLock lock.
TimerGroup::~TimerGroup() {
// If the timer group is destroyed before the timers it owns, accumulate and
// print the timing data.
TimerGroup::~TimerGroup() {
// If the timer group is destroyed before the timers it owns, accumulate and
// print the timing data.