llvm::getNextAvailablePluginDiagnosticKind

Return the next available kind ID for a plugin diagnostic.

Synopsis

Declared in <llvm/IR/DiagnosticInfo.h>

int
getNextAvailablePluginDiagnosticKind();

Description

Each time this function is called, it returns a different number. Therefore, a plugin that wants to "identify" its own classes with a dynamic identifier, just have to use this method to get a new ID and assign it to each of its classes. The returned ID will be greater than or equal to DK_FirstPluginKind. Thus, the plugin identifiers will not conflict with the DiagnosticKind values.

Return Value

A fresh plugin diagnostic kind ID (>= DK_FirstPluginKind).