[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [creduce-dev] llvm-svn-compatible merged



On 2014.09.18 at 10:42 -0600, John Regehr wrote:
> A slightly different approach, that we've been using in Souper, and that 
> I think I like better, is to depend on a specific LLVM revision, as seen 
> here:
> 
>    https://github.com/google/souper/blob/master/update_deps.sh
> 
> Then, of course, someone has to bump this every few weeks.  The 
> advantage is that in between bumps, it's clear which version of LLVM the 
> branch intends to support.

Or, if you're willing to add few #ifdefs, just check for a specific LLVM
version, e.g.:

#if defined(LLVM_VERSION_MAJOR) && LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 6
#define LLVM36 1
#endif
#if defined(LLVM_VERSION_MAJOR) && LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5
#define LLVM35 1

and then:

#ifdef LLVM36
...
#elif LLVM35
...
#else
...
#endif


-- 
Markus