From eb5230c4f98bd94c019bc2faed9432ca892e2f11 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 5 Feb 2002 03:35:31 +0000 Subject: Remove generic routines to Support/SetOperations.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1715 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Dominators.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'lib/VMCore') diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index 4589783..aad6e1c 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -9,27 +9,10 @@ #include "llvm/Method.h" #include "Support/DepthFirstIterator.h" #include "Support/STLExtras.h" +#include "Support/SetOperations.h" #include using std::set; - -//===----------------------------------------------------------------------===// -// Helper Template -//===----------------------------------------------------------------------===// - -// set_intersect - Identical to set_intersection, except that it works on -// set<>'s and is nicer to use. Functionally, this iterates through S1, -// removing elements that are not contained in S2. -// -template -void set_intersect(set &S1, const set &S2) { - for (typename set::iterator I = S1.begin(); I != S1.end();) { - const Ty &E = *I; - ++I; - if (!S2.count(E)) S1.erase(E); // Erase element if not in S2 - } -} - //===----------------------------------------------------------------------===// // DominatorSet Implementation //===----------------------------------------------------------------------===// -- cgit v1.1