summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lli/lli.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index 102811fec7..62e232ad68 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -53,7 +53,6 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Instrumentation.h"
#include <cerrno>
-#include <fstream>
#ifdef __CYGWIN__
#include <cygwin/version.h>
@@ -255,7 +254,8 @@ public:
std::string CacheName;
if (!getCacheFilename(ModuleID, CacheName))
return;
- std::ofstream outfile(CacheName.c_str(), std::ofstream::binary);
+ std::string errStr;
+ raw_fd_ostream outfile(CacheName.c_str(), errStr, sys::fs::F_Binary);
outfile.write(Obj->getBufferStart(), Obj->getBufferSize());
outfile.close();
}