Issue 64782
Summary X86ISelLowering.cpp in LLVM-17 doesn't compile with clang 6 on Ubuntu 18.04
Labels new issue
Assignees
Reporter etcwilde
    According to the docs, the base toolchain needed to build LLVM requires [Clang 5.0 or higher](https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library). Ubuntu 18.04 comes with clang 6, but LLVM does not build with clang 6 due to the move to template deduction guides.

The change in 38818b60c58c7, removing `makeArrayRef` and replacing it with the deduction guides, appears to have introduced the build failure. I am hitting the following build failure when building the LLVM 17 release with the X86 backend enabled on Ubuntu 18.04:
```
/home/ewilde/work/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:43050:17: error: cannot use parentheses when declaring variable with deduced class template specialization type
    if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
 ^
/home/ewilde/work/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:43050:18: error: variable declaration in condition must have an initializer
    if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
 ^
/home/ewilde/work/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:43085:21: error: cannot use parentheses when declaring variable with deduced class template specialization type
        if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
 ^
/home/ewilde/work/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:43085:22: error: variable declaration in condition must have an initializer
 if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
 ^
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to