[PATCH] D45490: [ADT] - Add llvm::make_mapped_range

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 08:47:01 PDT 2018


arichardson added inline comments.


================
Comment at: include/llvm/ADT/STLExtras.h:208
 private:
-  FuncTy F;
+  Optional<FuncTy> F;
 };
----------------
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?


https://reviews.llvm.org/D45490





More information about the llvm-commits mailing list