diff options
Diffstat (limited to 'lib/IR/GCOV.cpp')
-rw-r--r-- | lib/IR/GCOV.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/IR/GCOV.cpp b/lib/IR/GCOV.cpp index 1667401..245c500 100644 --- a/lib/IR/GCOV.cpp +++ b/lib/IR/GCOV.cpp @@ -298,7 +298,8 @@ uint64_t GCOVFunction::getExitCount() const { /// dump - Dump GCOVFunction content to dbgs() for debugging purposes. void GCOVFunction::dump() const { - dbgs() << "===== " << Name << " @ " << Filename << ":" << LineNumber << "\n"; + dbgs() << "===== " << Name << " (" << Ident << ") @ " << Filename << ":" + << LineNumber << "\n"; for (const auto &Block : Blocks) Block->dump(); } @@ -517,11 +518,11 @@ FileInfo::openCoveragePath(StringRef CoveragePath) { if (Options.NoOutput) return llvm::make_unique<raw_null_ostream>(); - std::string ErrorInfo; - auto OS = llvm::make_unique<raw_fd_ostream>(CoveragePath.str().c_str(), - ErrorInfo, sys::fs::F_Text); - if (!ErrorInfo.empty()) { - errs() << ErrorInfo << "\n"; + std::error_code EC; + auto OS = llvm::make_unique<raw_fd_ostream>(CoveragePath.str(), EC, + sys::fs::F_Text); + if (EC) { + errs() << EC.message() << "\n"; return llvm::make_unique<raw_null_ostream>(); } return std::move(OS); |