Skip to content
Commit ba9dc5f5 authored by Jakub Kuderski's avatar Jakub Kuderski
Browse files

[ADT] Add is_splat overload accepting initializer_list

Allow for `is_splat` to be used inline, similar to `is_contained`, e.g.,
```
if (is_splat({type1, type2, type3, type4}))
  ...
```

which is much more concise and less typo-prone than an equivalent chain of equality comparisons.

My immediate motivation is to clean up some code in the SPIR-V dialect that currently needs to either construct a temporary container or use `makeArrayRef` before calling `is_splat`.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D131289
parent 9641a201
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment