diff options
| author | Jakub Kuderski <kubak@google.com> | 2022-08-08 10:19:34 -0400 |
|---|---|---|
| committer | Jakub Kuderski <kubak@google.com> | 2022-08-08 10:20:02 -0400 |
| commit | ba9dc5f577389db2cc706c0c66615f430a55d153 (patch) | |
| tree | caf29d348775e25f26757aeb0680770b4e5609d8 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 9641a201a565346bfddfc02b13b2b583c056e61d (diff) | |
[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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
