Modernize raw_fd_ostream's constructor a bit.
[oota-llvm.git] / lib / Transforms / Instrumentation / GCOVProfiling.cpp
index cfeb62eb1f9fc722eb1eb980d4da22a53c9755d3..a1f42a8c3a4faa16e1d8479f96f1f7a8bea6b935 100644 (file)
@@ -480,9 +480,8 @@ void GCOVProfiler::emitProfileNotes() {
     // LTO, we'll generate the same .gcno files.
 
     DICompileUnit CU(CU_Nodes->getOperand(i));
-    std::string ErrorInfo;
-    raw_fd_ostream out(mangleName(CU, "gcno").c_str(), ErrorInfo,
-                       sys::fs::F_None);
+    std::error_code EC;
+    raw_fd_ostream out(mangleName(CU, "gcno"), EC, sys::fs::F_None);
     std::string EdgeDestinations;
 
     DIArray SPs = CU.getSubprograms();