[ADT] Add a 'find_as' operation to DenseSet.
authorLang Hames <lhames@gmail.com>
Sun, 19 Oct 2014 19:36:33 +0000 (19:36 +0000)
committerLang Hames <lhames@gmail.com>
Sun, 19 Oct 2014 19:36:33 +0000 (19:36 +0000)
commit63b14baf799b4c3ba8182596073ad5b3f37cd1cc
treedfdd0b92dea33ef979a9cd7df30ab18f95a0606b
parent63276ccdbd5553ad7af8362f9984b474d2345efa
[ADT] Add a 'find_as' operation to DenseSet.

This operation is analogous to its counterpart in DenseMap: It allows lookup
via cheap-to-construct keys (provided that getHashValue and isEqual are
implemented for the cheap key-type in the DenseMapInfo specialization).

Thanks to Chandler for the review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220168 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/DenseSet.h
unittests/ADT/DenseSetTest.cpp