[llvm-exegesis] Write out inconsistencies to a file.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D47013

llvm-svn: 332608
diff --git a/llvm/tools/llvm-exegesis/lib/Analysis.h b/llvm/tools/llvm-exegesis/lib/Analysis.h
index dcfaf34..d8046e5 100644
--- a/llvm/tools/llvm-exegesis/lib/Analysis.h
+++ b/llvm/tools/llvm-exegesis/lib/Analysis.h
@@ -33,10 +33,11 @@
            const InstructionBenchmarkClustering &Clustering);
 
   // Prints a csv of instructions for each cluster.
-  llvm::Error printClusters(llvm::raw_ostream &OS) const;
-
+  struct PrintClusters {};
   // Find potential errors in the scheduling information given measurements.
-  llvm::Error printSchedClassInconsistencies(llvm::raw_ostream &OS) const;
+  struct PrintSchedClassInconsistencies {};
+
+  template <typename Pass> llvm::Error run(llvm::raw_ostream &OS) const;
 
 private:
   void printInstructionRow(bool PrintSchedClass, size_t PointId,