This adds a helper for convenience to create mapped iterator ranges.
For use in D45166.
Differential D45490
[ADT] - Add llvm::make_mapped_range grimar on Apr 10 2018, 8:02 AM. Authored by
Details
This adds a helper for convenience to create mapped iterator ranges. For use in D45166.
Diff Detail Event Timeline
Comment Actions Seems like at -O2 clang 5.0.0 can optimize away all the optional checks (https://godbolt.org/g/rbGYrN) Comment Actions Hah, wow - didn't know you could include LLVM headers in godbolt code... Comment Actions Sorry, I am abandoning this. I think D45166 patch (for which this was written) will not be landed soon. |
Will using Optional here make lld slower with D45166 and a Release+Assertions build?
Can the compiler optimize away all the Optional assertions? Maybe using [F](ItTy It) { llvm_unreachable("end() derefeneced"); return F(It); } is easier to optimize?