diff options
| author | Tobias Grosser <tobias@grosser.es> | 2016-04-01 07:15:19 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2016-04-01 07:15:19 +0000 |
| commit | db6db505c9bb85e25bc122da7b169b955b725696 (patch) | |
| tree | 9defd4c4295343369fc360c9f5c5d26e74888115 | |
| parent | 43b657b5c7440c5b85b031732fb0281fdfa07560 (diff) | |
| download | bcm5719-llvm-db6db505c9bb85e25bc122da7b169b955b725696.tar.gz bcm5719-llvm-db6db505c9bb85e25bc122da7b169b955b725696.zip | |
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.
llvm-svn: 265114
| -rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 7810b94c4e5..594d656a284 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -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 |

