mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 18:06:47 +00:00

Fold expressions on Clang are limited to 256 elements. This causes compilation errors in cases when the amount of elements added exceeds this limit. Side-step the issue by restoring the original trick that would use the std::initializer_list. For the record, in our downstream Clang 16 gives: mlir/include/mlir/IR/Dialect.h:269:23: fatal error: instantiating fold expression with 688 arguments exceeded expression nesting limit of 256 (addType<Args>(), ...); Partially reverts 26d811b3ecd2fa1ca3d9b41e17fb42b8c7ad03d6. Co-authored-by: Nikita Kudriavtsev <nikita.kudriavtsev@intel.com> (cherry picked from commit e3a38a75ddc6ff00301ec19a0e2488d00f2cc297)