Rename some function arguments in MachineBasicBlock.cpp/h by turning the first letter...
[oota-llvm.git] / include / llvm / ProfileData / InstrProf.h
index b44b92ef62676fbd6869defdfdaa20124d7c6265..77055ba8726826d678bb70208695f34987a6756e 100644 (file)
 #ifndef LLVM_PROFILEDATA_INSTRPROF_H_
 #define LLVM_PROFILEDATA_INSTRPROF_H_
 
-#include "llvm/Support/system_error.h"
+#include "llvm/ADT/StringRef.h"
+#include <cstdint>
+#include <system_error>
+#include <vector>
 
 namespace llvm {
-
 const std::error_category &instrprof_category();
 
 enum class instrprof_error {
@@ -38,10 +40,20 @@ enum class instrprof_error {
     counter_overflow
 };
 
-inline error_code make_error_code(instrprof_error E) {
-  return error_code(static_cast<int>(E), instrprof_category());
+inline std::error_code make_error_code(instrprof_error E) {
+  return std::error_code(static_cast<int>(E), instrprof_category());
 }
 
+/// Profiling information for a single function.
+struct InstrProfRecord {
+  InstrProfRecord() {}
+  InstrProfRecord(StringRef Name, uint64_t Hash, std::vector<uint64_t> Counts)
+      : Name(Name), Hash(Hash), Counts(std::move(Counts)) {}
+  StringRef Name;
+  uint64_t Hash;
+  std::vector<uint64_t> Counts;
+};
+
 } // end namespace llvm
 
 namespace std {