[polly] r215627 - Add print method to RejectLog

Andreas Simbuerger simbuerg at fim.uni-passau.de
Thu Aug 14 01:53:18 PDT 2014


Author: simbuerg
Date: Thu Aug 14 03:53:18 2014
New Revision: 215627

URL: http://llvm.org/viewvc/llvm-project?rev=215627&view=rev
Log:
Add print method to RejectLog

Modified:
    polly/trunk/include/polly/ScopDetectionDiagnostic.h
    polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp

Modified: polly/trunk/include/polly/ScopDetectionDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopDetectionDiagnostic.h?rev=215627&r1=215626&r2=215627&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopDetectionDiagnostic.h (original)
+++ polly/trunk/include/polly/ScopDetectionDiagnostic.h Thu Aug 14 03:53:18 2014
@@ -180,6 +180,8 @@ public:
   /// @return true, if we store at least one error.
   bool hasErrors() const { return size() > 0; }
 
+  void print(raw_ostream &OS, int level = 0) const;
+
   const Region *region() const { return R; }
   void report(RejectReasonPtr Reject) { ErrorReports.push_back(Reject); }
 };

Modified: polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp?rev=215627&r1=215626&r2=215627&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp Thu Aug 14 03:53:18 2014
@@ -149,6 +149,13 @@ const llvm::DebugLoc &RejectReason::getD
   return Unknown;
 }
 
+// RejectLog.
+void RejectLog::print(raw_ostream &OS, int level) const {
+  int j = 0;
+  for (auto Reason : ErrorReports)
+    OS.indent(level) << "[" << j++ << "] " << Reason->getMessage() << "\n";
+}
+
 //===----------------------------------------------------------------------===//
 // ReportCFG.
 





More information about the llvm-commits mailing list