[polly] r215626 - Cleanup RejectLog code

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


Author: simbuerg
Date: Thu Aug 14 03:53:15 2014
New Revision: 215626

URL: http://llvm.org/viewvc/llvm-project?rev=215626&view=rev
Log:
Cleanup RejectLog code

Modified:
    polly/trunk/include/polly/ScopDetectionDiagnostic.h

Modified: polly/trunk/include/polly/ScopDetectionDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopDetectionDiagnostic.h?rev=215626&r1=215625&r2=215626&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopDetectionDiagnostic.h (original)
+++ polly/trunk/include/polly/ScopDetectionDiagnostic.h Thu Aug 14 03:53:15 2014
@@ -174,6 +174,10 @@ public:
   iterator begin() const { return ErrorReports.begin(); }
   iterator end() const { return ErrorReports.end(); }
   size_t size() const { return ErrorReports.size(); }
+
+  /// @brief Returns true, if we store at least one error.
+  ///
+  /// @return true, if we store at least one error.
   bool hasErrors() const { return size() > 0; }
 
   const Region *region() const { return R; }
@@ -214,7 +218,11 @@ public:
   }
 
   bool hasErrors(const Region *R) const {
-    return (Logs.count(R) && Logs.at(R).size() > 0);
+    if (!Logs.count(R))
+      return false;
+
+    RejectLog Log = Logs.at(R);
+    return Log.hasErrors();
   }
 
   bool hasErrors(Region *R) const { return hasErrors((const Region *)R); }





More information about the llvm-commits mailing list