microsoft/clc: drop LLVM dependency to version < 12
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 28 Sep 2021 11:33:08 +0000 (14:33 +0300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Sep 2021 13:29:56 +0000 (13:29 +0000)
Prior to LLVM 12, SmallVector requires 2 template arguments.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c4755a7c32e66c ("microsoft/clc: Support SPIR intermediates in the compilation APIs")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13083>

src/microsoft/clc/clc_helpers.cpp

index f892d8f..912a2a9 100644 (file)
@@ -874,7 +874,7 @@ clc_c_to_spir(const struct clc_compile_args *args,
    if (!pair.first)
       return -1;
 
-   ::llvm::SmallVector<char> buffer;
+   ::llvm::SmallVector<char, 0> buffer;
    ::llvm::BitcodeWriter writer(buffer);
    writer.writeModule(*pair.first);