<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 15, 2013 at 2:07 PM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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>
<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>
</blockquote><div><br></div><div>Yeah, this has been an outstanding project for a while now. I wonder if we could get a GSOC on it.</div><div><br></div><div>-- Sean Silva</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Alp.<div><div class="h5"><br>
<br>
On 15/11/2013 18:17, Quentin Colombet wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
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" target="_blank">http://lists.cs.uiuc.edu/<u></u>pipermail/llvmdev/2013-July/<u></u>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" target="_blank">http://llvm-reviews.chandlerc.<u></u>com/D2190</a><br>
<br>
Files:<br>
include/llvm/IR/LLVMContext.h<br>
lib/CodeGen/<u></u>PrologEpilogInserter.cpp<br>
lib/IR/LLVMContext.cpp<br>
lib/IR/LLVMContextImpl.cpp<br>
lib/IR/LLVMContextImpl.h<br>
<br>
<br></div></div><div class="im">
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>