aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/StringMap.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reset StringMap's NumTombstones on clears and rehashes.Jakob Stoklund Olesen2011-03-301-0/+3
| | | | | | | | | | | | | StringMap was not properly updating NumTombstones after a clear or rehash. This was not fatal until now because the table was growing faster than NumTombstones could, but with the previous change of preventing infinite growth of the table the invariant (NumItems + NumTombstones <= NumBuckets) stopped being observed, causing infinite loops in certain situations. Patch by José Fonseca! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128567 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent infinite growth of SmallMap instances.Jakob Stoklund Olesen2011-03-301-1/+13
| | | | | | | | Rehash but don't grow when full of tombstones. Patch by José Fonseca! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128565 91177308-0d34-0410-b5e6-96231b3b80d8
* Change all self assignments X=X to (void)X, so that we can turn on aJeffrey Yasskin2010-12-231-1/+1
| | | | | | | | | new gcc warning that complains on self-assignments and self-initializations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122458 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass StringRef by value.Daniel Dunbar2009-11-061-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8
* Move StringMap's string has function into StringExtras.hDaniel Dunbar2009-10-171-16/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84344 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert StringMap to using StringRef for its APIs.Daniel Dunbar2009-07-231-16/+10
| | | | | | | | | | | | | - Yay for '-'s and simplifications! - I kept StringMap::GetOrCreateValue for compatibility purposes, this can eventually go away. Likewise the StringMapEntry Create functions still follow the old style. - NIFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* stringmap memory managed with malloc nowChris Lattner2007-04-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35666 91177308-0d34-0410-b5e6-96231b3b80d8
* use calloc instead of new/memset, it is more efficientChris Lattner2007-04-041-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35644 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend StringMap to support being initialized as completely empty. WhenChris Lattner2007-04-041-2/+22
| | | | | | | initialized this way, they do not do a malloc to allocate their buckets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35642 91177308-0d34-0410-b5e6-96231b3b80d8
* greatly reduce hte default size of stringmap.Chris Lattner2007-04-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35632 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for removing elements out of StringMap.Chris Lattner2007-02-111-11/+52
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34185 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the ugly FindValue method with STL-like find methods.Chris Lattner2007-02-111-0/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34183 91177308-0d34-0410-b5e6-96231b3b80d8
* remove support for stringmap visitors now that iterators exist.Chris Lattner2007-02-111-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34180 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for iterators.Chris Lattner2007-02-111-2/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34179 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename CStringMap -> StringMap, since it now supports nul characters in theChris Lattner2007-02-081-8/+8
| | | | | | | strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34064 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow cstringmap to contain strings with nul characters in them.Chris Lattner2007-02-081-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34062 91177308-0d34-0410-b5e6-96231b3b80d8
* wow, the link was already broken :)Chris Lattner2007-01-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32963 91177308-0d34-0410-b5e6-96231b3b80d8
* add a noteChris Lattner2007-01-061-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32962 91177308-0d34-0410-b5e6-96231b3b80d8
* add a highly efficient hash table that is specialized for mapping C stringsChris Lattner2006-10-291-0/+134
to some other type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31286 91177308-0d34-0410-b5e6-96231b3b80d8