[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)
commitb27a3b0d43adbff9bb3ecb9afaa87ab420032735
tree05e70be7f4c47d03c226f04fc5c1717396525f0c
parent0c4b230b32ba04494deeabc4415f7248aa455068
[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.

llvm-svn: 220168
llvm/include/llvm/ADT/DenseSet.h
llvm/unittests/ADT/DenseSetTest.cpp