Support for LLVM 11
smunix opened this issue · comments
Thanks for closing this. Unfortunately, the current version of LLVM is 11 (2020-10-12) and it still fails to build for me. Should I open a new bug?
[1/188] Building CXX object CMakeFiles/hobbes-test.dir/test/Convert.C.o
In file included from ../test/Compiler.C:1:
In file included from ../include/hobbes/hobbes.H:6:
In file included from ../include/hobbes/eval/cc.H:7:
../include/hobbes/lang/tylift.H:429:37: error: unused parameter 'tenv' [-Werror,-Wunused-parameter]
static MonoTypePtr type(typedb& tenv) { return Prim::make("unit"); }
^
In file included from ../test/Compiler.C:1:
In file included from ../include/hobbes/hobbes.H:6:
In file included from ../include/hobbes/eval/cc.H:13:
In file included from ../include/hobbes/eval/jitcc.H:9:
../include/hobbes/util/llvm.H:15:2: error: "I don't know how to use this version of LLVM"
#error "I don't know how to use this version of LLVM"
^
In file included from ../test/Compiler.C:1:
In file included from ../include/hobbes/hobbes.H:6:
In file included from ../include/hobbes/eval/cc.H:13:
In file included from ../include/hobbes/eval/jitcc.H:9:
In file included from ../include/hobbes/util/llvm.H:18:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/IR/DerivedTypes.h:20:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/ADT/ArrayRef.h:12:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:49:
/home/chaz/.local/local/clang+llvm/include/llvm/Support/SwapByteOrder.h:152:13: error: no template named 'enable_if_t' in namespace 'std'
inline std::enable_if_t<std::is_enum<T>::value, T> getSwappedBytes(T C) {
~~~~~^
/home/chaz/.local/local/clang+llvm/include/llvm/Support/SwapByteOrder.h:154:40: error: no template named 'underlying_type_t' in namespace 'std'; did you mean 'underlying_type'?
getSwappedBytes(static_cast<std::underlying_type_t<T>>(C)));
~~~~~^~~~~~~~~~~~~~~~~
underlying_type
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/type_traits:2149:12: note: 'underlying_type' declared here
struct underlying_type
^
In file included from ../test/Compiler.C:1:
In file included from ../include/hobbes/hobbes.H:6:
In file included from ../include/hobbes/eval/cc.H:13:
In file included from ../include/hobbes/eval/jitcc.H:9:
In file included from ../include/hobbes/util/llvm.H:18:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/IR/DerivedTypes.h:20:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/ADT/ArrayRef.h:12:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:50:
/home/chaz/.local/local/clang+llvm/include/llvm/Support/type_traits.h:31:28: error: no template named 'remove_reference_t' in namespace 'std'; did you mean 'remove_reference'?
using UnderlyingT = std::remove_reference_t<T>;
~~~~~^~~~~~~~~~~~~~~~~~
remove_reference
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/type_traits:1456:12: note: 'remove_reference' declared here
struct remove_reference
^
In file included from ../test/Compiler.C:1:
In file included from ../include/hobbes/hobbes.H:6:
In file included from ../include/hobbes/eval/cc.H:13:
In file included from ../include/hobbes/eval/jitcc.H:9:
In file included from ../include/hobbes/util/llvm.H:18:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/IR/DerivedTypes.h:20:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/ADT/ArrayRef.h:12:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:50:
/home/chaz/.local/local/clang+llvm/include/llvm/Support/type_traits.h:48:13: error: no member named 'enable_if_t' in namespace 'std'
T, std::enable_if_t<std::is_pointer<T>::value>> {
~~~~~^
/home/chaz/.local/local/clang+llvm/include/llvm/Support/type_traits.h:48:51: error: expected unqualified-id
T, std::enable_if_t<std::is_pointer<T>::value>> {
^
/home/chaz/.local/local/clang+llvm/include/llvm/Support/type_traits.h:58:39: error: no member named 'enable_if_t' in namespace 'std'
struct add_const_past_pointer<T, std::enable_if_t<std::is_pointer<T>::value>> {
~~~~~^
/home/chaz/.local/local/clang+llvm/include/llvm/Support/type_traits.h:58:77: error: expected unqualified-id
struct add_const_past_pointer<T, std::enable_if_t<std::is_pointer<T>::value>> {
^
/home/chaz/.local/local/clang+llvm/include/llvm/Support/type_traits.h:68:40: error: no member named 'enable_if_t' in namespace 'std'
std::enable_if_t<std::is_pointer<T>::value>> {
~~~~~^
/home/chaz/.local/local/clang+llvm/include/llvm/Support/type_traits.h:68:78: error: expected unqualified-id
std::enable_if_t<std::is_pointer<T>::value>> {
^
In file included from ../test/Compiler.C:1:
In file included from ../include/hobbes/hobbes.H:6:
In file included from ../include/hobbes/eval/cc.H:13:
In file included from ../include/hobbes/eval/jitcc.H:9:
In file included from ../include/hobbes/util/llvm.H:18:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/IR/DerivedTypes.h:20:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/ADT/ArrayRef.h:12:
/home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:104:6: error: no template named 'enable_if_t' in namespace 'std'
std::enable_if_t<is_integral_or_enum<T>::value, hash_code> hash_value(T value);
~~~~~^
/home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:265:16: error: no matching constructor for initialization of 'llvm::hashing::detail::hash_state'
hash_state state = {
^ ~
/home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:258:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 7 were provided
struct hash_state {
^
/home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:258:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 7 were provided
/home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:258:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 7 were provided
/home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:362:6: error: no template named 'enable_if_t' in namespace 'std'
std::enable_if_t<is_hashable_data<T>::value, T>
~~~~~^
/home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:370:6: error: no template named 'enable_if_t' in namespace 'std'
std::enable_if_t<!is_hashable_data<T>::value, size_t>
~~~~~^
/home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:444:6: error: no template named 'enable_if_t' in namespace 'std'
std::enable_if_t<is_hashable_data<ValueT>::value, hash_code>
~~~~~^
/home/chaz/.local/local/clang+llvm/include/llvm/ADT/Hashing.h:629:6: error: no template named 'enable_if_t' in namespace 'std'
std::enable_if_t<is_integral_or_enum<T>::value, hash_code> hash_value(T value) {
~~~~~^
In file included from ../test/Compiler.C:1:
In file included from ../include/hobbes/hobbes.H:6:
In file included from ../include/hobbes/eval/cc.H:13:
In file included from ../include/hobbes/eval/jitcc.H:9:
In file included from ../include/hobbes/util/llvm.H:18:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/IR/DerivedTypes.h:20:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/ADT/ArrayRef.h:14:
In file included from /home/chaz/.local/local/clang+llvm/include/llvm/ADT/SmallVector.h:20:
/home/chaz/.local/local/clang+llvm/include/llvm/Support/MathExtras.h:396:23: error: no template named 'enable_if_t' in namespace 'std'
constexpr inline std::enable_if_t<(N < 64), bool> isUInt(uint64_t X) {
~~~~~^
/home/chaz/.local/local/clang+llvm/include/llvm/Support/MathExtras.h:401:23: error: no template named 'enable_if_t' in namespace 'std'
constexpr inline std::enable_if_t<N >= 64, bool> isUInt(uint64_t X) {
~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[...]
Originally posted by @Chaz6 in #315 (comment)