gallium/swr: Fix compilation with LLVM 12
[mesa.git] / src / gallium / drivers / swr / rasterizer / jitter / jit_pch.hpp
index 1bdba9d9acdd81b6b53e427f772f4ff1eaaf799d..a5c5b1f73c9eefce7b18d069cffde6e5824dac69 100644 (file)
@@ -138,6 +138,18 @@ static inline llvm::AttributeSet GetFuncAttribSet(llvm::LLVMContext&       ctx,
 }
 #endif
 
+#if LLVM_VERSION_MAJOR >= 12
+static inline llvm::VectorType* getVectorType(llvm::Type *ElementType, unsigned NumElements)
+{
+    return llvm::VectorType::get(ElementType, NumElements, false);
+}
+#else
+static inline llvm::VectorType* getVectorType(llvm::Type *ElementType, unsigned NumElements)
+{
+    return llvm::VectorType::get(ElementType, NumElements);
+}
+#endif
+
 #if LLVM_VERSION_MAJOR < 7
 #pragma pop_macro("DEBUG")
 #endif