aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJakub Kuderski <kubak@google.com>2022-11-29 19:56:23 -0500
committerJakub Kuderski <kubak@google.com>2022-11-29 19:56:25 -0500
commit21d434d997db58afcf03f72c5a34a56d2d46f6d1 (patch)
tree7e2a8e7f626b5aa92059e7f1b52dbdcb5f810c48 /flang/lib/Frontend/CompilerInvocation.cpp
parentaa7a3d4d3df23003ccb91cb49be97c37233cab5b (diff)
downloadllvm-21d434d997db58afcf03f72c5a34a56d2d46f6d1.zip
llvm-21d434d997db58afcf03f72c5a34a56d2d46f6d1.tar.gz
llvm-21d434d997db58afcf03f72c5a34a56d2d46f6d1.tar.bz2
[ADT] Add `zip_equal` for iteratees of equal lengths
Add a new version of `zip` that assumes that all iteratees have equal lengths. The difference compared to `zip_first` is that `zip_equal` checks this assumption in builds with assertions enabled. This will allow us to clearly express the intent when working with equally-sized ranges without having to write this assertion manually. This is similar to Python's `zip(..., equal=True)` [1] or `more_itertools.zip_equal` [2]. I saw this first suggested by @benvanik. [1] https://peps.python.org/pep-0618/ [2] https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.zip_equal Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D138865
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions