[PATCH] D14313: Add a libLTO diagnostic handler that supports lto_get_error_message API

Gao, Yunzhong via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 13:28:16 PST 2015


> -----Original Message-----
> From: dexonsmith at apple.com [mailto:dexonsmith at apple.com]
> Sent: Monday, November 09, 2015 1:22 PM
> To: reviews+D14313+public+c7532e444d4e6e18 at reviews.llvm.org
> Cc: Gao, Yunzhong; Mehdi Amini; llvm-commits; peter at pcc.me.uk;
> rafael.espindola at gmail.com
> Subject: Re: [PATCH] D14313: Add a libLTO diagnostic handler that supports
> lto_get_error_message API
> 
> 
> > On 2015-Nov-09, at 12:54, Mehdi AMINI <mehdi.amini at apple.com> wrote:
> >
> > joker.eph added inline comments.
> >
> > ================
> > Comment at: tools/llvm-lto/llvm-lto.cpp:115 @@ -114,3 +114,3 @@
> >   case LTO_DS_WARNING:
> > -    errs() << "warning: ";
> > +    errs() << "Warning: ";
> >     break;
> > ----------------
> > These changes are unrelated to the rest of this patch right? Please split if it
> is the case.
> >
> >
> > http://reviews.llvm.org/D14313
> 
> Actually, I don't understand why it's being capitalized.  Don't we usually use
> "error:" and "warning:" for clang diagnostics?  Wouldn't we want to be
> consistent in LTO, at least for the defaults?

We do. Well, llvm-lto.cpp is for testing, and right now, we use the same prefix in llvm-lto
and in the default handler, so the tests cannot distinguish between where a custom handler
has been installed and where the default handler is being used. So these capitalizations
are done in the custom handler installed by the llvm-lto tester, and then we verify that
with -use-diagnostic-handler, we get these custom spellings.


More information about the llvm-commits mailing list