@@ -245,8 +245,7 @@ void TracePC::IterateCoveredFunctions(CallBack CB) {
245245 do {
246246 NextFE++;
247247 } while (NextFE < M.Stop && !(NextFE->PCFlags & 1 ));
248- if (ObservedFuncs.count (FE->PC ))
249- CB (FE, NextFE, ObservedFuncs[FE->PC ]);
248+ CB (FE, NextFE, ObservedFuncs[FE->PC ]);
250249 }
251250 }
252251}
@@ -311,12 +310,13 @@ void TracePC::PrintCoverage() {
311310 for (auto TE = First; TE < Last; TE++)
312311 if (!ObservedPCs.count (TE->PC ))
313312 UncoveredPCs.push_back (TE->PC );
314- Printf (" COVERED_FUNC : hits: %zd" , Counter);
313+ Printf (" %sCOVERED_FUNC : hits: %zd" , Counter ? " " : " UN " , Counter);
315314 Printf (" edges: %zd/%zd" , NumEdges - UncoveredPCs.size (), NumEdges);
316315 Printf (" %s %s:%zd\n " , FunctionStr.c_str (), FileStr.c_str (), Line);
317- for (auto PC: UncoveredPCs)
318- Printf (" UNCOVERED_PC: %s\n " ,
319- DescribePC (" %s:%l" , GetNextInstructionPc (PC)).c_str ());
316+ if (Counter)
317+ for (auto PC : UncoveredPCs)
318+ Printf (" UNCOVERED_PC: %s\n " ,
319+ DescribePC (" %s:%l" , GetNextInstructionPc (PC)).c_str ());
320320 };
321321
322322 IterateCoveredFunctions (CoveredFunctionCallback);
0 commit comments