[llvm-profdata] Add support for weighted merge of profile data (2nd try)
[oota-llvm.git] / include / llvm / ProfileData / InstrProfWriter.h
index d026e08ec861d6bf152db0a0dbb71f4f2e71ebdf..1958d5f232e7efdd05e59f32cf6cf734f9d96b05 100644 (file)
@@ -39,8 +39,8 @@ public:
   void updateStringTableReferences(InstrProfRecord &I);
   /// Add function counts for the given function. If there are already counts
   /// for this function and the hash and number of counts match, each counter is
-  /// summed.
-  std::error_code addRecord(InstrProfRecord &&I);
+  /// summed. Optionally scale counts by \p Weight.
+  std::error_code addRecord(InstrProfRecord &&I, uint64_t Weight = 1);
   /// Write the profile to \c OS
   void write(raw_fd_ostream &OS);
   /// Write the profile in text format to \c OS