[PATCH] move LLVM_VERSION_PATCH to llvm-config.h

Tom Stellard tom at stellard.net
Tue Aug 12 17:00:53 PDT 2014


On Tue, Aug 12, 2014 at 04:28:56PM -0700, Chandler Carruth wrote:
> On Tue, Aug 12, 2014 at 4:25 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> > wrote:
> 
> > On Tue, Aug 12, 2014 at 04:18:47PM -0700, Chandler Carruth wrote:
> > > On Tue, Aug 12, 2014 at 3:41 PM, Dylan Noblesmith <nobled at dreamwidth.org
> > >
> > > wrote:
> > >
> > > > Since clients shouldn't (and shouldn't be able to)
> > > > include LLVM's internal config.h header, it was
> > > > effectively completely useless there.
> > > >
> > > > Put it where LLVM_VERSION_MAJOR and LLVM_VERSION_MINOR
> > > > already are instead.
> > > >
> > >
> > > But, the whole point was that it is *different*. There shouldn't ever be
> > > API breaking changes in a patch release? The point of patch releases were
> > > to apply minimal, targeted fixes for critical bugs. Clients shouldn't be
> > > aware of them IMO.
> >
> > They might still want to be able to workaround bugs fixed by those
> > targeted patches for critical bugs :)
> 
> 
> As the fix might arrive with the same SO name, I would not expect this to
> be done via macros.

In the Mesa project, we use LLVM_VERSION_PATCH to detect broken features.
For example:

#if LLVM_VERSION_PATCH < 2
#define FEATURE_BROKEN
#endif

#if FEATURE_BROKEN
...
#endif

This information is also available via the llvm-config program,
but I'm not sure if this is an option for all projects.

-Tom

> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list