forked from huawei/openGauss-server
判断LLVM_MAJOR_VERSION宏定义为空还是数值
This commit is contained in:
parent
8b30bd9ceb
commit
4dc0eb36e6
|
|
@ -155,17 +155,22 @@
|
||||||
|
|
||||||
#ifdef ENABLE_LLVM_COMPILE
|
#ifdef ENABLE_LLVM_COMPILE
|
||||||
/* The whole intrinsic methods are listed in include/llvm/IR/IntrinsicEnums.inc */
|
/* The whole intrinsic methods are listed in include/llvm/IR/IntrinsicEnums.inc */
|
||||||
#if LLVM_MAJOR_VERSION == 10
|
#ifdef LLVM_MAJOR_VERSION
|
||||||
|
|
||||||
|
#if (LLVM_MAJOR_VERSION - LLVM_MAJOR_VERSION -1 == 1)
|
||||||
|
#error LLVM version was defined as empty.
|
||||||
|
#else
|
||||||
|
#if (LLVM_MAJOR_VERSION == 10)
|
||||||
const int llvm_prefetch = 217;
|
const int llvm_prefetch = 217;
|
||||||
const int llvm_sadd_with_overflow = 229;
|
const int llvm_sadd_with_overflow = 229;
|
||||||
const int llvm_smul_with_overflow = 236;
|
const int llvm_smul_with_overflow = 236;
|
||||||
const int llvm_ssub_with_overflow = 241;
|
const int llvm_ssub_with_overflow = 241;
|
||||||
#elif LLVM_MAJOR_VERSION == 11
|
#elif (LLVM_MAJOR_VERSION == 11)
|
||||||
const int llvm_prefetch = 225;
|
const int llvm_prefetch = 225;
|
||||||
const int llvm_sadd_with_overflow = 239;
|
const int llvm_sadd_with_overflow = 239;
|
||||||
const int llvm_smul_with_overflow = 247;
|
const int llvm_smul_with_overflow = 247;
|
||||||
const int llvm_ssub_with_overflow = 252;
|
const int llvm_ssub_with_overflow = 252;
|
||||||
#elif LLVM_MAJOR_VERSION == 12
|
#elif (LLVM_MAJOR_VERSION == 12)
|
||||||
const int llvm_prefetch = 225;
|
const int llvm_prefetch = 225;
|
||||||
const int llvm_sadd_with_overflow = 240;
|
const int llvm_sadd_with_overflow = 240;
|
||||||
const int llvm_smul_with_overflow = 250;
|
const int llvm_smul_with_overflow = 250;
|
||||||
|
|
@ -173,6 +178,11 @@ const int llvm_ssub_with_overflow = 256;
|
||||||
#else
|
#else
|
||||||
#error Un-supported LLVM version.
|
#error Un-supported LLVM version.
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
#error LLVM version is not defined.
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Declare related LLVM classes to avoid namespace pollution.
|
* Declare related LLVM classes to avoid namespace pollution.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue