[Beignet] [PATCH] Fix build errors in llvm3.5 only system.
Zhigang Gong
zhigang.gong at linux.intel.com
Wed Feb 12 08:56:15 CET 2014
Thanks for pointing this out and fix it. Just pushed it.
Really don't know why the llvm/clang keep moving those
header files around here and then there so frequently. :(
On Wed, Feb 12, 2014 at 11:41:26PM +0800, Yang Rong wrote:
> There are some head files miss if have llvm3.5 only. If has previous llvm, even uninstall,
> will still remain these head files in system, so can't trigger it.
>
> Signed-off-by: Yang Rong <rong.r.yang at intel.com>
> ---
> backend/src/llvm/llvm_gen_backend.cpp | 6 ++++++
> backend/src/llvm/llvm_passes.cpp | 6 ++++++
> backend/src/llvm/llvm_to_gen.cpp | 5 +++--
> 3 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
> index a9c08bf..2d4fb0a 100644
> --- a/backend/src/llvm/llvm_gen_backend.cpp
> +++ b/backend/src/llvm/llvm_gen_backend.cpp
> @@ -105,7 +105,13 @@
> #include "llvm/Analysis/ValueTracking.h"
> #include "llvm/CodeGen/Passes.h"
> #include "llvm/CodeGen/IntrinsicLowering.h"
> +
> +#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >=5
> +#include "llvm/IR/Mangler.h"
> +#else
> #include "llvm/Target/Mangler.h"
> +#endif
> +
> #include "llvm/Transforms/Scalar.h"
> #include "llvm/MC/MCAsmInfo.h"
> #include "llvm/MC/MCContext.h"
> diff --git a/backend/src/llvm/llvm_passes.cpp b/backend/src/llvm/llvm_passes.cpp
> index 1091dae..d30a570 100644
> --- a/backend/src/llvm/llvm_passes.cpp
> +++ b/backend/src/llvm/llvm_passes.cpp
> @@ -64,7 +64,13 @@
> #include "llvm/Analysis/ValueTracking.h"
> #include "llvm/CodeGen/Passes.h"
> #include "llvm/CodeGen/IntrinsicLowering.h"
> +
> +#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >=5
> +#include "llvm/IR/Mangler.h"
> +#else
> #include "llvm/Target/Mangler.h"
> +#endif
> +
> #include "llvm/Transforms/Scalar.h"
> #include "llvm/MC/MCAsmInfo.h"
> #include "llvm/MC/MCContext.h"
> diff --git a/backend/src/llvm/llvm_to_gen.cpp b/backend/src/llvm/llvm_to_gen.cpp
> index 62d6f13..8b2ac04 100644
> --- a/backend/src/llvm/llvm_to_gen.cpp
> +++ b/backend/src/llvm/llvm_to_gen.cpp
> @@ -34,7 +34,6 @@
> #endif /* LLVM_VERSION_MINOR <= 2 */
> #include "llvm/PassManager.h"
> #include "llvm/Pass.h"
> -#include "llvm/Analysis/Verifier.h"
> #include "llvm/Analysis/Passes.h"
> #include "llvm/Transforms/IPO.h"
> #include "llvm/Target/TargetLibraryInfo.h"
> @@ -47,11 +46,13 @@
> #endif /* LLVM_VERSION_MINOR <= 2 */
> #include "llvm/Support/raw_ostream.h"
> #include "llvm/Transforms/Scalar.h"
> -#include "llvm/Assembly/PrintModulePass.h"
>
> #if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >=5
> #include "llvm/IR/IRPrintingPasses.h"
> #include "llvm/IR/Verifier.h"
> +#else
> +#include "llvm/Analysis/Verifier.h"
> +#include "llvm/Assembly/PrintModulePass.h"
> #endif
>
> #include "llvm/llvm_gen_backend.hpp"
> --
> 1.8.3.2
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list