<div dir="ltr">Hi Tobias<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 24, 2015 at 12:43 PM, Tobias Grosser <span dir="ltr"><<a href="mailto:tobias@grosser.es" target="_blank">tobias@grosser.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">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.<br></blockquote><div> </div></div>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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">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())</div><div class="gmail_extra"><br></div><div class="gmail_extra">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.</div></div>