1 //===- GCOV.cpp - LLVM coverage tool --------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // GCOV implements the interface to read and write coverage files that use
13 //===----------------------------------------------------------------------===//
15 #include "llvm/Support/GCOV.h"
16 #include "llvm/ADT/STLExtras.h"
17 #include "llvm/Support/Debug.h"
18 #include "llvm/Support/FileSystem.h"
19 #include "llvm/Support/Format.h"
20 #include "llvm/Support/MemoryObject.h"
21 #include "llvm/Support/Path.h"
22 #include "llvm/Support/raw_ostream.h"
24 #include <system_error>
27 //===----------------------------------------------------------------------===//
28 // GCOVFile implementation.
30 /// readGCNO - Read GCNO buffer.
31 bool GCOVFile::readGCNO(GCOVBuffer &Buffer) {
32 if (!Buffer.readGCNOFormat())
34 if (!Buffer.readGCOVVersion(Version))
37 if (!Buffer.readInt(Checksum))
40 if (!Buffer.readFunctionTag())
42 auto GFun = make_unique<GCOVFunction>(*this);
43 if (!GFun->readGCNO(Buffer, Version))
45 Functions.push_back(std::move(GFun));
48 GCNOInitialized = true;
52 /// readGCDA - Read GCDA buffer. It is required that readGCDA() can only be
53 /// called after readGCNO().
54 bool GCOVFile::readGCDA(GCOVBuffer &Buffer) {
55 assert(GCNOInitialized && "readGCDA() can only be called after readGCNO()");
56 if (!Buffer.readGCDAFormat())
58 GCOV::GCOVVersion GCDAVersion;
59 if (!Buffer.readGCOVVersion(GCDAVersion))
61 if (Version != GCDAVersion) {
62 errs() << "GCOV versions do not match.\n";
66 uint32_t GCDAChecksum;
67 if (!Buffer.readInt(GCDAChecksum))
69 if (Checksum != GCDAChecksum) {
70 errs() << "File checksums do not match: " << Checksum
71 << " != " << GCDAChecksum << ".\n";
74 for (size_t i = 0, e = Functions.size(); i < e; ++i) {
75 if (!Buffer.readFunctionTag()) {
76 errs() << "Unexpected number of functions.\n";
79 if (!Functions[i]->readGCDA(Buffer, Version))
82 if (Buffer.readObjectTag()) {
85 if (!Buffer.readInt(Length))
87 if (!Buffer.readInt(Dummy))
88 return false; // checksum
89 if (!Buffer.readInt(Dummy))
91 if (!Buffer.readInt(RunCount))
93 Buffer.advanceCursor(Length - 3);
95 while (Buffer.readProgramTag()) {
97 if (!Buffer.readInt(Length))
99 Buffer.advanceCursor(Length);
106 /// dump - Dump GCOVFile content to dbgs() for debugging purposes.
107 void GCOVFile::dump() const {
108 for (const auto &FPtr : Functions)
112 /// collectLineCounts - Collect line counts. This must be used after
113 /// reading .gcno and .gcda files.
114 void GCOVFile::collectLineCounts(FileInfo &FI) {
115 for (const auto &FPtr : Functions)
116 FPtr->collectLineCounts(FI);
117 FI.setRunCount(RunCount);
118 FI.setProgramCount(ProgramCount);
121 //===----------------------------------------------------------------------===//
122 // GCOVFunction implementation.
124 /// readGCNO - Read a function from the GCNO buffer. Return false if an error
126 bool GCOVFunction::readGCNO(GCOVBuffer &Buff, GCOV::GCOVVersion Version) {
128 if (!Buff.readInt(Dummy))
129 return false; // Function header length
130 if (!Buff.readInt(Ident))
132 if (!Buff.readInt(Checksum))
134 if (Version != GCOV::V402) {
135 uint32_t CfgChecksum;
136 if (!Buff.readInt(CfgChecksum))
138 if (Parent.getChecksum() != CfgChecksum) {
139 errs() << "File checksums do not match: " << Parent.getChecksum()
140 << " != " << CfgChecksum << " in (" << Name << ").\n";
144 if (!Buff.readString(Name))
146 if (!Buff.readString(Filename))
148 if (!Buff.readInt(LineNumber))
152 if (!Buff.readBlockTag()) {
153 errs() << "Block tag not found.\n";
157 if (!Buff.readInt(BlockCount))
159 for (uint32_t i = 0, e = BlockCount; i != e; ++i) {
160 if (!Buff.readInt(Dummy))
161 return false; // Block flags;
162 Blocks.push_back(make_unique<GCOVBlock>(*this, i));
166 while (Buff.readEdgeTag()) {
168 if (!Buff.readInt(EdgeCount))
170 EdgeCount = (EdgeCount - 1) / 2;
172 if (!Buff.readInt(BlockNo))
174 if (BlockNo >= BlockCount) {
175 errs() << "Unexpected block number: " << BlockNo << " (in " << Name
179 for (uint32_t i = 0, e = EdgeCount; i != e; ++i) {
181 if (!Buff.readInt(Dst))
183 Edges.push_back(make_unique<GCOVEdge>(*Blocks[BlockNo], *Blocks[Dst]));
184 GCOVEdge *Edge = Edges.back().get();
185 Blocks[BlockNo]->addDstEdge(Edge);
186 Blocks[Dst]->addSrcEdge(Edge);
187 if (!Buff.readInt(Dummy))
188 return false; // Edge flag
193 while (Buff.readLineTag()) {
194 uint32_t LineTableLength;
195 // Read the length of this line table.
196 if (!Buff.readInt(LineTableLength))
198 uint32_t EndPos = Buff.getCursor() + LineTableLength * 4;
200 // Read the block number this table is associated with.
201 if (!Buff.readInt(BlockNo))
203 if (BlockNo >= BlockCount) {
204 errs() << "Unexpected block number: " << BlockNo << " (in " << Name
208 GCOVBlock &Block = *Blocks[BlockNo];
209 // Read the word that pads the beginning of the line table. This may be a
210 // flag of some sort, but seems to always be zero.
211 if (!Buff.readInt(Dummy))
214 // Line information starts here and continues up until the last word.
215 if (Buff.getCursor() != (EndPos - sizeof(uint32_t))) {
217 // Read the source file name.
218 if (!Buff.readString(F))
221 errs() << "Multiple sources for a single basic block: " << Filename
222 << " != " << F << " (in " << Name << ").\n";
225 // Read lines up to, but not including, the null terminator.
226 while (Buff.getCursor() < (EndPos - 2 * sizeof(uint32_t))) {
228 if (!Buff.readInt(Line))
230 // Line 0 means this instruction was injected by the compiler. Skip it.
235 // Read the null terminator.
236 if (!Buff.readInt(Dummy))
239 // The last word is either a flag or padding, it isn't clear which. Skip
241 if (!Buff.readInt(Dummy))
247 /// readGCDA - Read a function from the GCDA buffer. Return false if an error
249 bool GCOVFunction::readGCDA(GCOVBuffer &Buff, GCOV::GCOVVersion Version) {
251 if (!Buff.readInt(Dummy))
252 return false; // Function header length
255 if (!Buff.readInt(GCDAIdent))
257 if (Ident != GCDAIdent) {
258 errs() << "Function identifiers do not match: " << Ident
259 << " != " << GCDAIdent << " (in " << Name << ").\n";
263 uint32_t GCDAChecksum;
264 if (!Buff.readInt(GCDAChecksum))
266 if (Checksum != GCDAChecksum) {
267 errs() << "Function checksums do not match: " << Checksum
268 << " != " << GCDAChecksum << " (in " << Name << ").\n";
272 uint32_t CfgChecksum;
273 if (Version != GCOV::V402) {
274 if (!Buff.readInt(CfgChecksum))
276 if (Parent.getChecksum() != CfgChecksum) {
277 errs() << "File checksums do not match: " << Parent.getChecksum()
278 << " != " << CfgChecksum << " (in " << Name << ").\n";
284 if (!Buff.readString(GCDAName))
286 if (Name != GCDAName) {
287 errs() << "Function names do not match: " << Name << " != " << GCDAName
292 if (!Buff.readArcTag()) {
293 errs() << "Arc tag not found (in " << Name << ").\n";
298 if (!Buff.readInt(Count))
302 // This for loop adds the counts for each block. A second nested loop is
303 // required to combine the edge counts that are contained in the GCDA file.
304 for (uint32_t BlockNo = 0; Count > 0; ++BlockNo) {
305 // The last block is always reserved for exit block
306 if (BlockNo >= Blocks.size()) {
307 errs() << "Unexpected number of edges (in " << Name << ").\n";
310 if (BlockNo == Blocks.size() - 1)
311 errs() << "(" << Name << ") has arcs from exit block.\n";
312 GCOVBlock &Block = *Blocks[BlockNo];
313 for (size_t EdgeNo = 0, End = Block.getNumDstEdges(); EdgeNo < End;
316 errs() << "Unexpected number of edges (in " << Name << ").\n";
320 if (!Buff.readInt64(ArcCount))
322 Block.addCount(EdgeNo, ArcCount);
325 Block.sortDstEdges();
330 /// getEntryCount - Get the number of times the function was called by
331 /// retrieving the entry block's count.
332 uint64_t GCOVFunction::getEntryCount() const {
333 return Blocks.front()->getCount();
336 /// getExitCount - Get the number of times the function returned by retrieving
337 /// the exit block's count.
338 uint64_t GCOVFunction::getExitCount() const {
339 return Blocks.back()->getCount();
342 /// dump - Dump GCOVFunction content to dbgs() for debugging purposes.
343 void GCOVFunction::dump() const {
344 dbgs() << "===== " << Name << " (" << Ident << ") @ " << Filename << ":"
345 << LineNumber << "\n";
346 for (const auto &Block : Blocks)
350 /// collectLineCounts - Collect line counts. This must be used after
351 /// reading .gcno and .gcda files.
352 void GCOVFunction::collectLineCounts(FileInfo &FI) {
353 // If the line number is zero, this is a function that doesn't actually appear
354 // in the source file, so there isn't anything we can do with it.
358 for (const auto &Block : Blocks)
359 Block->collectLineCounts(FI);
360 FI.addFunctionLine(Filename, LineNumber, this);
363 //===----------------------------------------------------------------------===//
364 // GCOVBlock implementation.
366 /// ~GCOVBlock - Delete GCOVBlock and its content.
367 GCOVBlock::~GCOVBlock() {
373 /// addCount - Add to block counter while storing the edge count. If the
374 /// destination has no outgoing edges, also update that block's count too.
375 void GCOVBlock::addCount(size_t DstEdgeNo, uint64_t N) {
376 assert(DstEdgeNo < DstEdges.size()); // up to caller to ensure EdgeNo is valid
377 DstEdges[DstEdgeNo]->Count = N;
379 if (!DstEdges[DstEdgeNo]->Dst.getNumDstEdges())
380 DstEdges[DstEdgeNo]->Dst.Counter += N;
383 /// sortDstEdges - Sort destination edges by block number, nop if already
384 /// sorted. This is required for printing branch info in the correct order.
385 void GCOVBlock::sortDstEdges() {
386 if (!DstEdgesAreSorted) {
387 SortDstEdgesFunctor SortEdges;
388 std::stable_sort(DstEdges.begin(), DstEdges.end(), SortEdges);
392 /// collectLineCounts - Collect line counts. This must be used after
393 /// reading .gcno and .gcda files.
394 void GCOVBlock::collectLineCounts(FileInfo &FI) {
395 for (uint32_t N : Lines)
396 FI.addBlockLine(Parent.getFilename(), N, this);
399 /// dump - Dump GCOVBlock content to dbgs() for debugging purposes.
400 void GCOVBlock::dump() const {
401 dbgs() << "Block : " << Number << " Counter : " << Counter << "\n";
402 if (!SrcEdges.empty()) {
403 dbgs() << "\tSource Edges : ";
404 for (const GCOVEdge *Edge : SrcEdges)
405 dbgs() << Edge->Src.Number << " (" << Edge->Count << "), ";
408 if (!DstEdges.empty()) {
409 dbgs() << "\tDestination Edges : ";
410 for (const GCOVEdge *Edge : DstEdges)
411 dbgs() << Edge->Dst.Number << " (" << Edge->Count << "), ";
414 if (!Lines.empty()) {
415 dbgs() << "\tLines : ";
416 for (uint32_t N : Lines)
417 dbgs() << (N) << ",";
422 //===----------------------------------------------------------------------===//
423 // FileInfo implementation.
425 // Safe integer division, returns 0 if numerator is 0.
426 static uint32_t safeDiv(uint64_t Numerator, uint64_t Divisor) {
429 return Numerator / Divisor;
432 // This custom division function mimics gcov's branch ouputs:
433 // - Round to closest whole number
434 // - Only output 0% or 100% if it's exactly that value
435 static uint32_t branchDiv(uint64_t Numerator, uint64_t Divisor) {
438 if (Numerator == Divisor)
441 uint8_t Res = (Numerator * 100 + Divisor / 2) / Divisor;
450 struct formatBranchInfo {
451 formatBranchInfo(const GCOVOptions &Options, uint64_t Count, uint64_t Total)
452 : Options(Options), Count(Count), Total(Total) {}
454 void print(raw_ostream &OS) const {
456 OS << "never executed";
457 else if (Options.BranchCount)
458 OS << "taken " << Count;
460 OS << "taken " << branchDiv(Count, Total) << "%";
463 const GCOVOptions &Options;
468 static raw_ostream &operator<<(raw_ostream &OS, const formatBranchInfo &FBI) {
474 std::unique_ptr<MemoryBuffer> Buffer;
478 LineConsumer(StringRef Filename) {
479 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
480 MemoryBuffer::getFileOrSTDIN(Filename);
481 if (std::error_code EC = BufferOrErr.getError()) {
482 errs() << Filename << ": " << EC.message() << "\n";
485 Buffer = std::move(BufferOrErr.get());
486 Remaining = Buffer->getBuffer();
489 bool empty() { return Remaining.empty(); }
490 void printNext(raw_ostream &OS, uint32_t LineNum) {
495 std::tie(Line, Remaining) = Remaining.split("\n");
496 OS << format("%5u:", LineNum) << Line << "\n";
501 /// Convert a path to a gcov filename. If PreservePaths is true, this
502 /// translates "/" to "#", ".." to "^", and drops ".", to match gcov.
503 static std::string mangleCoveragePath(StringRef Filename, bool PreservePaths) {
505 return sys::path::filename(Filename).str();
507 // This behaviour is defined by gcov in terms of text replacements, so it's
508 // not likely to do anything useful on filesystems with different textual
510 llvm::SmallString<256> Result("");
511 StringRef::iterator I, S, E;
512 for (I = S = Filename.begin(), E = Filename.end(); I != E; ++I) {
516 if (I - S == 1 && *S == '.') {
517 // ".", the current directory, is skipped.
518 } else if (I - S == 2 && *S == '.' && *(S + 1) == '.') {
519 // "..", the parent directory, is replaced with "^".
523 // Leave other components intact,
525 // And separate with "#".
526 Result.push_back('#');
536 std::string FileInfo::getCoveragePath(StringRef Filename,
537 StringRef MainFilename) {
538 if (Options.NoOutput)
539 // This is probably a bug in gcov, but when -n is specified, paths aren't
540 // mangled at all, and the -l and -p options are ignored. Here, we do the
544 std::string CoveragePath;
545 if (Options.LongFileNames && !Filename.equals(MainFilename))
547 mangleCoveragePath(MainFilename, Options.PreservePaths) + "##";
548 CoveragePath += mangleCoveragePath(Filename, Options.PreservePaths) + ".gcov";
552 std::unique_ptr<raw_ostream>
553 FileInfo::openCoveragePath(StringRef CoveragePath) {
554 if (Options.NoOutput)
555 return llvm::make_unique<raw_null_ostream>();
558 auto OS = llvm::make_unique<raw_fd_ostream>(CoveragePath.str(), EC,
561 errs() << EC.message() << "\n";
562 return llvm::make_unique<raw_null_ostream>();
564 return std::move(OS);
567 /// print - Print source files with collected line count information.
568 void FileInfo::print(raw_ostream &InfoOS, StringRef MainFilename,
569 StringRef GCNOFile, StringRef GCDAFile) {
570 for (const auto &LI : LineInfo) {
571 StringRef Filename = LI.first();
572 auto AllLines = LineConsumer(Filename);
574 std::string CoveragePath = getCoveragePath(Filename, MainFilename);
575 std::unique_ptr<raw_ostream> CovStream = openCoveragePath(CoveragePath);
576 raw_ostream &CovOS = *CovStream;
578 CovOS << " -: 0:Source:" << Filename << "\n";
579 CovOS << " -: 0:Graph:" << GCNOFile << "\n";
580 CovOS << " -: 0:Data:" << GCDAFile << "\n";
581 CovOS << " -: 0:Runs:" << RunCount << "\n";
582 CovOS << " -: 0:Programs:" << ProgramCount << "\n";
584 const LineData &Line = LI.second;
585 GCOVCoverage FileCoverage(Filename);
586 for (uint32_t LineIndex = 0; LineIndex < Line.LastLine || !AllLines.empty();
588 if (Options.BranchInfo) {
589 FunctionLines::const_iterator FuncsIt = Line.Functions.find(LineIndex);
590 if (FuncsIt != Line.Functions.end())
591 printFunctionSummary(CovOS, FuncsIt->second);
594 BlockLines::const_iterator BlocksIt = Line.Blocks.find(LineIndex);
595 if (BlocksIt == Line.Blocks.end()) {
596 // No basic blocks are on this line. Not an executable line of code.
598 AllLines.printNext(CovOS, LineIndex + 1);
600 const BlockVector &Blocks = BlocksIt->second;
602 // Add up the block counts to form line counts.
603 DenseMap<const GCOVFunction *, bool> LineExecs;
604 uint64_t LineCount = 0;
605 for (const GCOVBlock *Block : Blocks) {
606 if (Options.AllBlocks) {
607 // Only take the highest block count for that line.
608 uint64_t BlockCount = Block->getCount();
609 LineCount = LineCount > BlockCount ? LineCount : BlockCount;
611 // Sum up all of the block counts.
612 LineCount += Block->getCount();
615 if (Options.FuncCoverage) {
616 // This is a slightly convoluted way to most accurately gather line
617 // statistics for functions. Basically what is happening is that we
618 // don't want to count a single line with multiple blocks more than
619 // once. However, we also don't simply want to give the total line
620 // count to every function that starts on the line. Thus, what is
621 // happening here are two things:
622 // 1) Ensure that the number of logical lines is only incremented
623 // once per function.
624 // 2) If there are multiple blocks on the same line, ensure that the
625 // number of lines executed is incremented as long as at least
626 // one of the blocks are executed.
627 const GCOVFunction *Function = &Block->getParent();
628 if (FuncCoverages.find(Function) == FuncCoverages.end()) {
629 std::pair<const GCOVFunction *, GCOVCoverage> KeyValue(
630 Function, GCOVCoverage(Function->getName()));
631 FuncCoverages.insert(KeyValue);
633 GCOVCoverage &FuncCoverage = FuncCoverages.find(Function)->second;
635 if (LineExecs.find(Function) == LineExecs.end()) {
636 if (Block->getCount()) {
637 ++FuncCoverage.LinesExec;
638 LineExecs[Function] = true;
640 LineExecs[Function] = false;
642 ++FuncCoverage.LogicalLines;
643 } else if (!LineExecs[Function] && Block->getCount()) {
644 ++FuncCoverage.LinesExec;
645 LineExecs[Function] = true;
653 CovOS << format("%9" PRIu64 ":", LineCount);
654 ++FileCoverage.LinesExec;
656 ++FileCoverage.LogicalLines;
658 AllLines.printNext(CovOS, LineIndex + 1);
660 uint32_t BlockNo = 0;
662 for (const GCOVBlock *Block : Blocks) {
663 // Only print block and branch information at the end of the block.
664 if (Block->getLastLine() != LineIndex + 1)
666 if (Options.AllBlocks)
667 printBlockInfo(CovOS, *Block, LineIndex, BlockNo);
668 if (Options.BranchInfo) {
669 size_t NumEdges = Block->getNumDstEdges();
671 printBranchInfo(CovOS, *Block, FileCoverage, EdgeNo);
672 else if (Options.UncondBranch && NumEdges == 1)
673 printUncondBranchInfo(CovOS, EdgeNo,
674 (*Block->dst_begin())->Count);
679 FileCoverages.push_back(std::make_pair(CoveragePath, FileCoverage));
682 // FIXME: There is no way to detect calls given current instrumentation.
683 if (Options.FuncCoverage)
684 printFuncCoverage(InfoOS);
685 printFileCoverage(InfoOS);
689 /// printFunctionSummary - Print function and block summary.
690 void FileInfo::printFunctionSummary(raw_ostream &OS,
691 const FunctionVector &Funcs) const {
692 for (const GCOVFunction *Func : Funcs) {
693 uint64_t EntryCount = Func->getEntryCount();
694 uint32_t BlocksExec = 0;
695 for (const GCOVBlock &Block : Func->blocks())
696 if (Block.getNumDstEdges() && Block.getCount())
699 OS << "function " << Func->getName() << " called " << EntryCount
700 << " returned " << safeDiv(Func->getExitCount() * 100, EntryCount)
701 << "% blocks executed "
702 << safeDiv(BlocksExec * 100, Func->getNumBlocks() - 1) << "%\n";
706 /// printBlockInfo - Output counts for each block.
707 void FileInfo::printBlockInfo(raw_ostream &OS, const GCOVBlock &Block,
708 uint32_t LineIndex, uint32_t &BlockNo) const {
709 if (Block.getCount() == 0)
712 OS << format("%9" PRIu64 ":", Block.getCount());
713 OS << format("%5u-block %2u\n", LineIndex + 1, BlockNo++);
716 /// printBranchInfo - Print conditional branch probabilities.
717 void FileInfo::printBranchInfo(raw_ostream &OS, const GCOVBlock &Block,
718 GCOVCoverage &Coverage, uint32_t &EdgeNo) {
719 SmallVector<uint64_t, 16> BranchCounts;
720 uint64_t TotalCounts = 0;
721 for (const GCOVEdge *Edge : Block.dsts()) {
722 BranchCounts.push_back(Edge->Count);
723 TotalCounts += Edge->Count;
724 if (Block.getCount())
725 ++Coverage.BranchesExec;
727 ++Coverage.BranchesTaken;
730 if (Options.FuncCoverage) {
731 const GCOVFunction *Function = &Block.getParent();
732 GCOVCoverage &FuncCoverage = FuncCoverages.find(Function)->second;
733 if (Block.getCount())
734 ++FuncCoverage.BranchesExec;
736 ++FuncCoverage.BranchesTaken;
737 ++FuncCoverage.Branches;
741 for (uint64_t N : BranchCounts)
742 OS << format("branch %2u ", EdgeNo++)
743 << formatBranchInfo(Options, N, TotalCounts) << "\n";
746 /// printUncondBranchInfo - Print unconditional branch probabilities.
747 void FileInfo::printUncondBranchInfo(raw_ostream &OS, uint32_t &EdgeNo,
748 uint64_t Count) const {
749 OS << format("unconditional %2u ", EdgeNo++)
750 << formatBranchInfo(Options, Count, Count) << "\n";
753 // printCoverage - Print generic coverage info used by both printFuncCoverage
754 // and printFileCoverage.
755 void FileInfo::printCoverage(raw_ostream &OS,
756 const GCOVCoverage &Coverage) const {
757 OS << format("Lines executed:%.2f%% of %u\n",
758 double(Coverage.LinesExec) * 100 / Coverage.LogicalLines,
759 Coverage.LogicalLines);
760 if (Options.BranchInfo) {
761 if (Coverage.Branches) {
762 OS << format("Branches executed:%.2f%% of %u\n",
763 double(Coverage.BranchesExec) * 100 / Coverage.Branches,
765 OS << format("Taken at least once:%.2f%% of %u\n",
766 double(Coverage.BranchesTaken) * 100 / Coverage.Branches,
769 OS << "No branches\n";
771 OS << "No calls\n"; // to be consistent with gcov
775 // printFuncCoverage - Print per-function coverage info.
776 void FileInfo::printFuncCoverage(raw_ostream &OS) const {
777 for (const auto &FC : FuncCoverages) {
778 const GCOVCoverage &Coverage = FC.second;
779 OS << "Function '" << Coverage.Name << "'\n";
780 printCoverage(OS, Coverage);
785 // printFileCoverage - Print per-file coverage info.
786 void FileInfo::printFileCoverage(raw_ostream &OS) const {
787 for (const auto &FC : FileCoverages) {
788 const std::string &Filename = FC.first;
789 const GCOVCoverage &Coverage = FC.second;
790 OS << "File '" << Coverage.Name << "'\n";
791 printCoverage(OS, Coverage);
792 if (!Options.NoOutput)
793 OS << Coverage.Name << ":creating '" << Filename << "'\n";