llvm-cov: Use the number of executed functions for the function coverage metric.
[oota-llvm.git] / include / llvm / ProfileData / CoverageMapping.h
index 15445b5996364e63d3c2fb9f70625ca781c3aa7d..617afd4df28ef3cc0c938d22693c81c0f1c5f6e1 100644 (file)
@@ -228,9 +228,13 @@ struct FunctionRecord {
   std::vector<std::string> Filenames;
   /// \brief Regions in the function along with their counts.
   std::vector<CountedRegion> CountedRegions;
+  /// \brief The number of times this function was executed.
+  uint64_t ExecutionCount;
 
-  FunctionRecord(StringRef Name, ArrayRef<StringRef> Filenames)
-      : Name(Name), Filenames(Filenames.begin(), Filenames.end()) {}
+  FunctionRecord(StringRef Name, ArrayRef<StringRef> Filenames,
+                 uint64_t ExecutionCount)
+      : Name(Name), Filenames(Filenames.begin(), Filenames.end()),
+        ExecutionCount(ExecutionCount) {}
 };
 
 /// \brief Coverage information for a macro expansion or #included file.