Modernize raw_fd_ostream's constructor a bit.
[oota-llvm.git] / lib / CodeGen / RegAllocPBQP.cpp
index 3e6988e2149cb89a2a8754266c88dc69974a46fb..80f129f46e80d97f1f7497cdc513f625676e7a86 100644 (file)
@@ -587,8 +587,8 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
         std::ostringstream rs;
         rs << round;
         std::string graphFileName(fqn + "." + rs.str() + ".pbqpgraph");
-        std::string tmp;
-        raw_fd_ostream os(graphFileName.c_str(), tmp, sys::fs::F_Text);
+        std::error_code EC;
+        raw_fd_ostream os(graphFileName, EC, sys::fs::F_Text);
         DEBUG(dbgs() << "Dumping graph for round " << round << " to \""
               << graphFileName << "\"\n");
         problem->getGraph().dump(os);