[PATCH] D35043: [ADT] Enable reverse iteration for DenseMap

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 12 13:15:24 PDT 2017


mgrang added a comment.

> Probably a layering violation to include this here. Also seems like a narrow solution - would require more special casing here for other types that are like these two whenever they might get used in a map eventually, etc.

Yes, this is true. But I cannot think of a way of overcoming this.

> Any chance of implementing is_pointer_like as "is a pointer, or (SFINAE'd) is pointer like"?

I have already implemented IsPointerLike as a SFINAE.

> (I'd probably name the trait "IsPointerLike" to match the kind of naming of PointerLikeTypeTraits - though I realize this might be a bit confusing if it's true for things that don't have PointerLikeTypeTraits, like these two special cases you mentioned (LLVMOpaqueBasicBlock & LLVMOpaqueValue) )

Done.


Repository:
  rL LLVM

https://reviews.llvm.org/D35043





More information about the llvm-commits mailing list