[polly] r265114 - ScoPDetection: Obtain a known free diagnostic ID

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 00:15:19 PDT 2016


Author: grosser
Date: Fri Apr  1 02:15:19 2016
New Revision: 265114

URL: http://llvm.org/viewvc/llvm-project?rev=265114&view=rev
Log:
ScoPDetection: Obtain a known free diagnostic ID

... instead of hardcoding something that has been free at some point. This fixes
a crash triggered by r265084, where the diagnostic IDs have been shifted in a
way that resulted our hardcode ID to not be assigned any implementation.  Our ID
was likely already wrong earlier on, but this time we really crashed nicely.

Modified:
    polly/trunk/lib/Analysis/ScopDetection.cpp

Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=265114&r1=265113&r2=265114&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Fri Apr  1 02:15:19 2016
@@ -216,7 +216,8 @@ public:
   }
 };
 
-int DiagnosticScopFound::PluginDiagnosticKind = 10;
+int DiagnosticScopFound::PluginDiagnosticKind =
+    getNextAvailablePluginDiagnosticKind();
 
 void DiagnosticScopFound::print(DiagnosticPrinter &DP) const {
   DP << "Polly detected an optimizable loop region (scop) in function '" << F




More information about the llvm-commits mailing list