mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Make SmallSet<whatever*, N> faster by transparently implementing it with
SmallPtrSet. Some clients will need to use SmallPtrSet directly though if they need to iterate over the set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#define LLVM_ADT_SMALLSET_H
|
#define LLVM_ADT_SMALLSET_H
|
||||||
|
|
||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
@@ -101,6 +102,10 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// If this set is of pointer values, transparently switch over to using
|
||||||
|
/// SmallPtrSet for performance.
|
||||||
|
template <typename PointeeType, unsigned N>
|
||||||
|
class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user