[Beignet] [PATCH 5/7] Backend: Refine LLVM version check macro

Pan, Xiuli xiuli.pan at intel.com
Fri Mar 17 07:48:48 UTC 2017


I tried, but some files won't include llvm_includes.hpp and will cause include chaos.
So I just use some script to just replace the && type to *10 + to make the LLVM version check everywhere is the same.

-----Original Message-----
From: Song, Ruiling 
Sent: Friday, March 17, 2017 2:23 PM
To: Pan, Xiuli <xiuli.pan at intel.com>; beignet at lists.freedesktop.org
Cc: Pan, Xiuli <xiuli.pan at intel.com>
Subject: RE: [Beignet] [PATCH 5/7] Backend: Refine LLVM version check macro


> -#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 9
> +#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 39

I think it is better to add "LLVM_VERSION" in llvm_includes.hpp:
#define LLVM_VERSION (LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR) So at each place we only check LLVM_VERSION against a specific version number.
Like #if LLVM_VERSION >=39

Thanks!
Ruiling



More information about the Beignet mailing list