summaryrefslogtreecommitdiff
path: root/tools/opt/GraphPrinters.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/opt/GraphPrinters.cpp')
-rw-r--r--tools/opt/GraphPrinters.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp
index d689a4a1da..9de7d6ac54 100644
--- a/tools/opt/GraphPrinters.cpp
+++ b/tools/opt/GraphPrinters.cpp
@@ -31,16 +31,16 @@ static void WriteGraphToFile(raw_ostream &O, const std::string &GraphName,
tool_output_file F(Filename.c_str(), ErrInfo);
if (ErrInfo.empty()) {
- WriteGraph(F, GT);
- F.close();
- if (!F.has_error()) {
+ WriteGraph(F.os(), GT);
+ F.os().close();
+ if (!F.os().has_error()) {
O << "\n";
F.keep();
return;
}
}
- F.clear_error();
O << " error opening file for writing!\n";
+ F.os().clear_error();
}