projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix an off by 1 bug that prevented SmallPtrSet from using all of its 'small' capacity...
[oota-llvm.git]
/
lib
/
Support
/
StringPool.cpp
diff --git
a/lib/Support/StringPool.cpp
b/lib/Support/StringPool.cpp
index b9c1fd0465bd69d1171955cadcb71fddcfc56c20..76faabc92bb5c74feb4039bfa6e043600d58c262 100644
(file)
--- a/
lib/Support/StringPool.cpp
+++ b/
lib/Support/StringPool.cpp
@@
-12,7
+12,7
@@
//===----------------------------------------------------------------------===//
#include "llvm/Support/StringPool.h"
//===----------------------------------------------------------------------===//
#include "llvm/Support/StringPool.h"
-#include "llvm/
Support/Streams
.h"
+#include "llvm/
ADT/StringRef
.h"
using namespace llvm;
using namespace llvm;
@@
-22,12
+22,12
@@
StringPool::~StringPool() {
assert(InternTable.empty() && "PooledStringPtr leaked!");
}
assert(InternTable.empty() && "PooledStringPtr leaked!");
}
-PooledStringPtr StringPool::intern(
const char *Begin, const char *End
) {
- table_t::iterator I = InternTable.find(
Begin, End
);
+PooledStringPtr StringPool::intern(
StringRef Key
) {
+ table_t::iterator I = InternTable.find(
Key
);
if (I != InternTable.end())
return PooledStringPtr(&*I);
if (I != InternTable.end())
return PooledStringPtr(&*I);
- entry_t *S = entry_t::Create(
Begin, End
);
+ entry_t *S = entry_t::Create(
Key
);
S->getValue().Pool = this;
InternTable.insert(S);
S->getValue().Pool = this;
InternTable.insert(S);