cqwrteur@Home-Server:~/myhome/llvm_build/llvm_build$ ninja
[1974/5995] Building CXX object lib/Target/AMDGPU/CM...les/LLVMAMDGPUCodeGen.dir/SILoadStoreOptimizer.cpp.o
FAILED: lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SILoadStoreOptimizer.cpp.o
/usr/local/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/cqwrteur/myhome/llvm_build/llvm_build/lib/Target/AMDGPU -I/home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU -I/home/cqwrteur/myhome/llvm_build/llvm_build/include -I/home/cqwrteur/myhome/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -flto=thin -g -fvisibility=hidden -fno-exceptions -fno-rtti -std=c++14 -MD -MT lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SILoadStoreOptimizer.cpp.o -MF lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SILoadStoreOptimizer.cpp.o.d -o lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SILoadStoreOptimizer.cpp.o -c /home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
In file included from /home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:60:
In file included from /home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/AMDGPU.h:13:
In file included from /home/cqwrteur/myhome/llvm-project/llvm/include/llvm/IR/PassManager.h:57:
In file included from /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/list:63:
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/stl_list.h:179:13: error: no matching function for call to object of type '(lambda at /home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:2068:9)'
{ return _M_cmp(*_Iter(__lhs), *_Iter(__rhs)); } ^~~~~~
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/stl_list.h:203:12: note: in instantiation of member function 'std::__detail::_Scratch_list::_Ptr_cmp<std::_List_const_iterator<(anonymous namespace)::SILoadStoreOptimizer::CombineInfo>, (lambda at /home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:2068:9)>::operator()' requested here
if (__comp(__first2, __first1)) ^
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/list.tcc:640:20: note: in instantiation of function template specialization 'std::detail::_Scratch_list::merge<std::detail::_Scratch_list::_Ptr_cmp<std::_List_const_iterator<(anonymous namespace)::SILoadStoreOptimizer::CombineInfo>, (lambda at /home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:2068:9)>>' requested here
__counter->merge(__carry, __ptr_comp); ^
/home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:2067:15: note: in instantiation of function template specialization 'std::list<(anonymous namespace)::SILoadStoreOptimizer::CombineInfo>::sort<(lambda at /home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:2068:9)>' requested here
MergeList.sort( ^
/home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:2068:9: note: candidate function not viable: 2nd argument ('const (anonymous namespace)::SILoadStoreOptimizer::CombineInfo') would lose const qualifier
- (const CombineInfo &A, CombineInfo &B) { ^
/home/cqwrteur/myhome/llvm-project/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:2068:9: note: conversion candidate of type 'bool (*)(const (anonymous namespace)::SILoadStoreOptimizer::CombineInfo &, (anonymous namespace)::SILoadStoreOptimizer::CombineInfo &)'
1 error generated.
[2007/5995] Building CXX object lib/Target/AMDGPU/As...eFiles/LLVMAMDGPUAsmParser.dir/AMDGPUAsmParser.cpp.o
ninja: build stopped: subcommand failed.
Need to fix it as soon as possible since it breaks the bootstrapping of the LLVM. (probably because my gcc is too new. GCC12.0.0)
Also i use clang-format to format the file and that is why you see so many changes. Actually i only change the lambda part.