From 19d9ca49205d8257e6a2d5a5f78eaef4f440e25b Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Wed, 19 Aug 2020 11:17:33 -0700 Subject: [PATCH] fix for trunk llvm, try #2 Previous fix broke LLVM 11 (I was too eager to land, sorry) --- src/CodeGen_Internal.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CodeGen_Internal.cpp b/src/CodeGen_Internal.cpp index cf74bc620d7e..ccfbb491c37e 100644 --- a/src/CodeGen_Internal.cpp +++ b/src/CodeGen_Internal.cpp @@ -152,10 +152,14 @@ llvm::Type *get_vector_element_type(llvm::Type *t) { } } -#if LLVM_VERSION >= 110 +#if LLVM_VERSION >= 120 const llvm::ElementCount element_count(int e) { return llvm::ElementCount::getFixed(e); } +#elif LLVM_VERSION >= 110 +const llvm::ElementCount element_count(int e) { + return llvm::ElementCount(e, /*scalable*/ false); +} #else int element_count(int e) { return e;