aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorJakub Kuderski <kubak@google.com>2023-02-28 16:24:10 -0500
committerJakub Kuderski <kubak@google.com>2023-02-28 16:24:51 -0500
commit981ce8fa15afa11d083033240edb1daff29081c7 (patch)
tree1386c0688f64517825195e5bd9cf19fb191d3e64 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent466b4327f8fcaf82178b02dffc66a5ff11a150d4 (diff)
downloadllvm-981ce8fa15afa11d083033240edb1daff29081c7.zip
llvm-981ce8fa15afa11d083033240edb1daff29081c7.tar.gz
llvm-981ce8fa15afa11d083033240edb1daff29081c7.tar.bz2
[ADT] Fix const-correctness issues in `zippy`
This defines the iterator tuple based on the storage type of `zippy`, instead of its type arguments. This way, we can support temporaries that gets passed in and allow for them to be modified during iteration. Because the iterator types to the tuple storage can have different types when the storage is and isn't const, this defines a const iterator type and non-const `begin`/`end` functions. This way we avoid unintentional casts, e.g., trying to cast `vector<bool>::reference` to `vector<bool>::const_reference`, which may be unrelated types that are not convertible. This patch is a general and free-standing improvement but my primary use is in the implemention a version of `enumerate` that accepts multiple ranges: D144583. Reviewed By: dblaikie, zero9178 Differential Revision: https://reviews.llvm.org/D144834
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions