Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Dunbar
4dee7fd2c2 Move StringMap's string has function into StringExtras.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84344 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 18:21:06 +00:00
Daniel Dunbar
6316fbcb04 Convert StringMap to using StringRef for its APIs.
- 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
2009-07-23 18:17:34 +00:00
Chris Lattner
4ee451de36 Remove attribution from file headers, per discussion on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:36:04 +00:00
Chris Lattner
12ba806c5d stringmap memory managed with malloc now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35666 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-04 17:24:28 +00:00
Chris Lattner
d2f197da59 use calloc instead of new/memset, it is more efficient
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-04 00:44:31 +00:00
Chris Lattner
794a014809 Extend StringMap to support being initialized as completely empty. When
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
2007-04-04 00:29:37 +00:00
Chris Lattner
ef4c916193 greatly reduce hte default size of stringmap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-03 22:15:38 +00:00
Chris Lattner
44dcd01cb3 Add support for removing elements out of StringMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34185 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 20:58:00 +00:00
Chris Lattner
b5bb9f5b5c Replace the ugly FindValue method with STL-like find methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34183 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 19:49:41 +00:00
Chris Lattner
360cac8fef remove support for stringmap visitors now that iterators exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34180 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 08:22:15 +00:00
Chris Lattner
a86559ec42 add support for iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34179 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 08:20:35 +00:00
Chris Lattner
bb28a81ba3 Rename CStringMap -> StringMap, since it now supports nul characters in the
strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34064 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 19:20:57 +00:00
Chris Lattner
ee182422ff Allow cstringmap to contain strings with nul characters in them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 19:08:37 +00:00
Chris Lattner
41a4429f65 wow, the link was already broken :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32963 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 23:20:51 +00:00
Chris Lattner
38742b9603 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32962 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 23:19:38 +00:00
Chris Lattner
23d7b36117 add a highly efficient hash table that is specialized for mapping C strings
to some other type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 23:42:03 +00:00