mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 06:31:18 +00:00
Replace fstream use with raw_fd_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198821 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0b5675926a
commit
fd4f17f0d9
@ -53,7 +53,6 @@
|
|||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/Transforms/Instrumentation.h"
|
#include "llvm/Transforms/Instrumentation.h"
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
#include <cygwin/version.h>
|
#include <cygwin/version.h>
|
||||||
@ -255,7 +254,8 @@ public:
|
|||||||
std::string CacheName;
|
std::string CacheName;
|
||||||
if (!getCacheFilename(ModuleID, CacheName))
|
if (!getCacheFilename(ModuleID, CacheName))
|
||||||
return;
|
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.write(Obj->getBufferStart(), Obj->getBufferSize());
|
||||||
outfile.close();
|
outfile.close();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user