]> granicus.if.org Git - llvm/commit
[SmallPtrSet] Introduce a find primitive and rewrite count/erase in terms of it
authorPhilip Reames <listmail@philipreames.com>
Sat, 31 Dec 2016 02:33:22 +0000 (02:33 +0000)
committerPhilip Reames <listmail@philipreames.com>
Sat, 31 Dec 2016 02:33:22 +0000 (02:33 +0000)
commitc090423e1522618db6e1a78dc8b2ce4ab10088c9
treeb7805b7bcda7e833de7858ebdddf0fb06b5962b2
parent3afd0d746deb4e9cf87bd2482a4564a5d8857d58
[SmallPtrSet] Introduce a find primitive and rewrite count/erase in terms of it

This was originally motivated by a compile time problem I've since figured out how to solve differently, but the cleanup seemed useful. We had the same logic - which essentially implemented find - in several places. By commoning them out, I can implement find and allow erase to be inlined at the call sites if profitable.

Differential Revision: https://reviews.llvm.org/D28183

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290779 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/SmallPtrSet.h
lib/Support/SmallPtrSet.cpp