X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FTimer.cpp;h=e1a531a0af2531d63b53ae3bf2d47775a3e49c64;hb=52fa0d066a8fb81716713b85841b1aa031dbf8fc;hp=7738283bad086719c1a3ec8561889436c036cc09;hpb=9020dc35dc63ad1b3cffcdfaeb2d8396d23223db;p=oota-llvm.git diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp index 7738283bad0..e1a531a0af2 100644 --- a/lib/Support/Timer.cpp +++ b/lib/Support/Timer.cpp @@ -18,6 +18,7 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Format.h" #include "llvm/Support/ManagedStatic.h" +#include "llvm/Support/Mutex.h" #include "llvm/Support/MutexGuard.h" #include "llvm/Support/Process.h" #include "llvm/Support/raw_ostream.h" @@ -65,10 +66,10 @@ raw_ostream *llvm::CreateInfoOutputFile() { // each time -stats or -time-passes wants to print output to it. To // 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 | sys::fs::F_Text); - if (Error.empty()) + std::error_code EC; + raw_ostream *Result = new raw_fd_ostream(OutputFilename, EC, + sys::fs::F_Append | sys::fs::F_Text); + if (!EC) return Result; errs() << "Error opening info-output-file '"