Handle inline stacks in gcov-encoded sample profiles.
[oota-llvm.git] / include / llvm / ProfileData / SampleProfWriter.h
index 302a82d3286122d044cb3eb10ef908e828bde8bc..d3fa7429a6d4afb0326ec38b2db4800de02c077c 100644 (file)
@@ -84,12 +84,18 @@ protected:
 class SampleProfileWriterText : public SampleProfileWriter {
 public:
   SampleProfileWriterText(StringRef F, std::error_code &EC)
-      : SampleProfileWriter(F, EC, sys::fs::F_Text) {}
+      : SampleProfileWriter(F, EC, sys::fs::F_Text), Indent(0) {}
 
   bool write(StringRef FName, const FunctionSamples &S) override;
   bool write(const Module &M, StringMap<FunctionSamples> &P) {
     return SampleProfileWriter::write(M, P);
   }
+
+private:
+  /// Indent level to use when writing.
+  ///
+  /// This is used when printing inlined callees.
+  unsigned Indent;
 };
 
 /// \brief Sample-based profile writer (binary format).