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
This commit is contained in:
Tobias Grosser 2016-04-01 07:15:19 +00:00
parent 43b657b5c7
commit db6db505c9
1 changed files with 2 additions and 1 deletions

View File

@ -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