swr: Fix build with llvm-10.0.
authorVinson Lee <vlee@freedesktop.org>
Sat, 14 Dec 2019 04:47:51 +0000 (20:47 -0800)
committerVinson Lee <vlee@freedesktop.org>
Sun, 22 Dec 2019 00:36:27 +0000 (16:36 -0800)
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 <vlee@freedesktop.org>
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp

index 42b2d6d80964355b432bdf2b562ef2ed2c27aa19..6b9a6b3375fb1797a9c429591089557d25cea882 100644 (file)
@@ -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"