<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Alp,<div><br></div><div>Thanks for sharing your thoughts.</div><div><br><div><div>On Nov 15, 2013, at 11:07 AM, Alp Toker <<a href="mailto:alp@nuanti.com">alp@nuanti.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Hi Quentin,<br><br>This is neat!<br><br>It could be nice to call it 'Diagnostic' rather than 'Report' in order to follow the existing convention in clang.<br></div></blockquote><div>I do not have a strong opinion on the naming and you made good points for calling that Diagnostic :).</div><div>I will wait for other feedbacks and rename that Diagnostic if nobody complains.</div><div>However, I think the naming of the method LLVMContext::report is fine.</div><div>What do you think?</div><div><br></div><div>Cheers,</div>-Quentin<br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>Even if it works slightly differently than clang diags right now, it has pretty much the same purpose, is intended to feed into the clang diag system, and I think there's potential for an "eventual" unification of diagnostic facilities if this idea gets taken up in LLVM core.<br><br>The benefit apart from familiar terminology would be that existing language binding wrappers, serializations and editor integration code could be lowered from clang and reused for standalone LLVM diagnostics and other language frontends some day.<br><br>Alp.<br><br>On 15/11/2013 18:17, Quentin Colombet wrote:<br><blockquote type="cite">Hi dblaikie, echristo, rengolin, chandlerc,<br><br>Hi,<br><br>This patch implements the proposal discussed a few months ago (<a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063845.html">http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063845.html</a>) regarding adding warning capabilities in LLVM.<br><br>//// Overview ////<br><br>The patch adds a new LLVMContext::report that can be used to communicate to the front-end, if any, that something of interest happened.<br>The report contains the following information:<br>- The kind of the report: What this is this about.<br>- The severity of the report: How bad this is.<br>- The default message to print: What should be reported.<br>- A data field: Some meta information.<br><br>The data field should be used to communicate all sort of data to the front-end. Ultimately, this field should provide enough information to the front-end so that it could build its own diagnostic if it does not want to print the default message.<br>This means that both the back-end and the front-end should agree on the structure of this field based on the pair kind/severity.<br>This feature is not stressed by this patch.<br><br>This patch introduces a new ReportHandlerTy and a new ReportContext that should be set by the front-end to be able to map these reports in its own diagnostics system.<br><br>//// Next Steps ////<br><br>- Send the patch for clang (I have it on hold).<br>- Switch to this reporting for all warnings printing happening in the backend.<br>- Switch the InlineAsmDiagHandler to the new reporting mechanism. This involves a bit of work, especially regarding the meta data.<br><br>Thanks for your reviews.<br><br>Cheers,<br>Quentin<br><br>PS: Sorry for the delay, it took my ages to get to this point in my todolist.<br><br><a href="http://llvm-reviews.chandlerc.com/D2190">http://llvm-reviews.chandlerc.com/D2190</a><br><br>Files:<br>  include/llvm/IR/LLVMContext.h<br>  lib/CodeGen/PrologEpilogInserter.cpp<br>  lib/IR/LLVMContext.cpp<br>  lib/IR/LLVMContextImpl.cpp<br>  lib/IR/LLVMContextImpl.h<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote><br>--<span class="Apple-converted-space"> </span><br><a href="http://www.nuanti.com/">http://www.nuanti.com</a><br>the browser experts</div></blockquote></div><br></div></body></html>