projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Eliminate redundant bitwise operations when using a llvm/ADT/PointerUnion.
[oota-llvm.git]
/
include
/
llvm
/
ADT
/
DenseSet.h
diff --git
a/include/llvm/ADT/DenseSet.h
b/include/llvm/ADT/DenseSet.h
index 00bcf64a2fc7c246514b33753f05a308fb363419..8ab9a33200c3b5025e52897f7280fe3d33b9e766 100644
(file)
--- a/
include/llvm/ADT/DenseSet.h
+++ b/
include/llvm/ADT/DenseSet.h
@@
-28,11
+28,14
@@
class DenseSet {
MapTy TheMap;
public:
DenseSet(const DenseSet &Other) : TheMap(Other.TheMap) {}
MapTy TheMap;
public:
DenseSet(const DenseSet &Other) : TheMap(Other.TheMap) {}
- explicit DenseSet(unsigned NumInitBuckets =
64
) : TheMap(NumInitBuckets) {}
+ explicit DenseSet(unsigned NumInitBuckets =
0
) : TheMap(NumInitBuckets) {}
bool empty() const { return TheMap.empty(); }
unsigned size() const { return TheMap.size(); }
bool empty() const { return TheMap.empty(); }
unsigned size() const { return TheMap.size(); }
+ /// Grow the denseset so that it has at least Size buckets. Does not shrink
+ void resize(size_t Size) { TheMap.resize(Size); }
+
void clear() {
TheMap.clear();
}
void clear() {
TheMap.clear();
}