From: Vinson Lee Date: Sat, 14 Dec 2019 04:47:51 +0000 (-0800) Subject: swr: Fix build with llvm-10.0. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d971cc1cafbe4396a890f60764ce532b4872c30;p=mesa.git swr: Fix build with llvm-10.0. Fix build error after llvm-10 commit 5d986953c8b9 ("[IR] Split out target specific intrinsic enums into separate headers"). ../src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp:78:37: error: ‘x86_bmi_bextr_32’ is not a member of ‘llvm::Intrinsic’ {"meta.intrinsic.BEXTR_32", Intrinsic::x86_bmi_bextr_32}, ^ Signed-off-by: Vinson Lee Reviewed-by: Krzysztof Raszkowski Reviewed-by: Jan Zielinski --- diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp index 42b2d6d8096..6b9a6b3375f 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp @@ -49,6 +49,9 @@ #include "llvm/IR/Type.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/IntrinsicInst.h" +#if LLVM_VERSION_MAJOR >= 10 +#include "llvm/IR/IntrinsicsX86.h" +#endif #include "llvm/ExecutionEngine/ObjectCache.h" #include "llvm/IR/Verifier.h"