mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
use raw_fd_ostream instead of fstream with graphwriter,
flush the right stream in opt.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -28,9 +28,10 @@ static void WriteGraphToFile(std::ostream &O, const std::string &GraphName,
|
||||
const GraphType >) {
|
||||
std::string Filename = GraphName + ".dot";
|
||||
O << "Writing '" << Filename << "'...";
|
||||
std::ofstream F(Filename.c_str());
|
||||
std::string ErrInfo;
|
||||
raw_fd_ostream F(Filename.c_str(), ErrInfo, raw_fd_ostream::F_Force);
|
||||
|
||||
if (F.good())
|
||||
if (ErrInfo.empty())
|
||||
WriteGraph(F, GT);
|
||||
else
|
||||
O << " error opening file for writing!";
|
||||
|
Reference in New Issue
Block a user