Handle inline stacks in gcov-encoded sample profiles.
[oota-llvm.git] / include / llvm / ProfileData / SampleProfReader.h
index 87c871f855b353a2efed9e38cda0baa63fac7b01..9f4d53902e1c4e1687c1f418f944321423448352 100644 (file)
@@ -189,7 +189,7 @@ struct SourceInfo {
   uint32_t Discriminator;
 };
 
-typedef std::vector<SourceInfo> SourceStack;
+typedef SmallVector<FunctionSamples *, 10> InlineCallStack;
 
 // Supported histogram types in GCC.  Currently, we only need support for
 // call target histograms.
@@ -220,9 +220,8 @@ public:
 
 protected:
   std::error_code readNameTable();
-  std::error_code addSourceCount(StringRef Name, const SourceStack &Src,
-                                 uint64_t Count);
-  std::error_code readOneFunctionProfile(const SourceStack &Stack, bool Update);
+  std::error_code readOneFunctionProfile(const InlineCallStack &InlineStack,
+                                         bool Update, uint32_t Offset);
   std::error_code readFunctionProfiles();
   std::error_code skipNextWord();
   template <typename T> ErrorOr<T> readNumber();