diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 102811fec7c..62e232ad68e 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 -#include #ifdef __CYGWIN__ #include @@ -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(); }