[LLVMdev] Out-of-source subclassses vs. LLVM's RTTI system

Christian Convey
Wed, 24 Jun 2015 17:00:45 -0000

Hi Tobias

On Wed, Jun 24, 2015 at 12:43 PM, Tobias Grosser <tobias at grosser.es>
wrote:

> Maybe have a look at Polly's lib/Analysis/ScopDetectionDiagnostic.cpp
and
> lib/Analysis/ScopDetection.cpp. We use LLVM's diagnostics in a loadable
> module without modifying LLVM's DiagnosticKind enum.
>

Thanks very much for the suggestion.  It looks like Polly's approach is the
same as my initial approach: just call the most-appropriate-seeming
llvm::emit...Remark...(...) method.

I can use that as a fallback approach, if needed.  But I was hoping
implement a function for emitting diagnostic info, where one of the
parameters was the severity level (llvm::DiagnosticSeverity).  I'm
particularly interested in drawing a distinction between "remarks"
(which
should be optionally filtered) and "warnings" (which should always be
sent
to errs())

The DiagnosticInfoOptimizationBase supports the exact set of details I care
about.  Unfortunately it's an abstract class, which is why I'm in my
current situation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20150624/b5795748/attachment.html>