aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/StringMap.h
Commit message (Collapse)AuthorAgeFilesLines
* Pass StringRef by value.Daniel Dunbar2009-11-061-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert StringMap to using StringRef for its APIs.Daniel Dunbar2009-07-231-61/+35
| | | | | | | | | | | | | - 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
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-211-8/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
* Add StringMap::lookup.Daniel Dunbar2009-03-121-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66750 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a pretty serious bug in StringMap where GetOrCreate(strstart,strend, z) Chris Lattner2009-02-041-9/+16
| | | | | | | would not set new values to Z. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63707 91177308-0d34-0410-b5e6-96231b3b80d8
* * Don't explicitly cast "0" to "void*". This doesn't work well with specializedBill Wendling2009-01-081-3/+3
| | | | | | | | | | StringMapEntryInitializer classes. Leave it for the compiler to figure out what the type is and what "0" should be transformed into. * Un-disable the unit tests which test the StringMapEntryInitializer class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61922 91177308-0d34-0410-b5e6-96231b3b80d8
* * Added unittests for StringMapMisha Brukman2009-01-081-2/+4
| | | | | | | | | | * Fixed but in StringMap::clear() * Removed trailing whitespace Original patch by Talin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61914 91177308-0d34-0410-b5e6-96231b3b80d8
* Add typedef to StringMapEntry.Ted Kremenek2008-11-271-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60134 91177308-0d34-0410-b5e6-96231b3b80d8
* optimize StringMap::clearChris Lattner2008-07-021-6/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53009 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new (simple) StringMap::clear method, patch by PratikChris Lattner2008-07-021-0/+6
| | | | | | | Solanki! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53008 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove warnings about shadowed and unused variables.Bill Wendling2008-06-261-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52791 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass std::string by reference. Thanks Chris!Dan Gohman2008-06-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52678 91177308-0d34-0410-b5e6-96231b3b80d8
* Add methods to StringMap to erase entries by key.Dan Gohman2008-06-231-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52640 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't dereference an invalid pointer if string is empty.Anton Korobeynikov2008-02-051-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46781 91177308-0d34-0410-b5e6-96231b3b80d8
* Add convenient std::string helpers to StringMap. Patch by Mikhail Glushenkov!Anton Korobeynikov2008-01-311-4/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46625 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply the patch with fix.Anton Korobeynikov2008-01-311-7/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46615 91177308-0d34-0410-b5e6-96231b3b80d8
* revert anton's recent stringmap patch, which breaks clang.Chris Lattner2008-01-311-33/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46614 91177308-0d34-0410-b5e6-96231b3b80d8
* Make StringMap to be more STL'ish. Patch by Mikhail Glushenkov!Anton Korobeynikov2008-01-311-6/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46612 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace cleanupAnton Korobeynikov2008-01-311-53/+52
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46611 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords, and fix a minor typo that they uncovered.Dan Gohman2007-12-141-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45034 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass the whole StringMapEntry into StringMapEntryInitializer::Initialize.Chris Lattner2007-11-291-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44432 91177308-0d34-0410-b5e6-96231b3b80d8
* provide an optional API to allow datatypes in a stringmap to be *gasp* Chris Lattner2007-11-291-7/+41
| | | | | | | | initialized with a value if they want, by specializing the StringMapEntryInitializer class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44430 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords.Dan Gohman2007-11-191-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44234 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cosmetic cleanups in the calculation of alignments forTed Kremenek2007-10-171-3/+5
| | | | | | | StringMapEntry objects. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43097 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated StringMap to use llvm::AlignOf to compute the alignment of mapTed Kremenek2007-10-171-9/+3
| | | | | | | entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43089 91177308-0d34-0410-b5e6-96231b3b80d8
* don't use intptr_t without including it.Chris Lattner2007-10-121-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42921 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this compute the correct offset, handling alignment of the elementChris Lattner2007-10-121-2/+3
| | | | | | | pointer correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42918 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a helper useful when mapping from a map element to its hash node.Chris Lattner2007-09-301-1/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42480 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable the string map copy ctor and assignment operators,Chris Lattner2007-07-221-1/+16
| | | | | | | | | | | they don't do the right thing. Implement StringMap::erase. Fix a nasty bug in the default ctor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40395 91177308-0d34-0410-b5e6-96231b3b80d8
* use calloc instead of new/memset, it is more efficientChris Lattner2007-04-041-1/+1
| | | | 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-11/+24
| | | | | | | 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
* add new ShouldRehash method to factor out common code. Fix the dtor to notChris Lattner2007-02-111-12/+14
| | | | | | | delete tombstones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34189 91177308-0d34-0410-b5e6-96231b3b80d8
* do not allow hash table to be filled with tombstones.Chris Lattner2007-02-111-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34186 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for removing elements out of StringMap.Chris Lattner2007-02-111-1/+42
| | | | 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-5/+16
| | | | 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-10/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34180 91177308-0d34-0410-b5e6-96231b3b80d8
* add iterator support, plus support for size() and empty().Chris Lattner2007-02-111-1/+75
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34178 91177308-0d34-0410-b5e6-96231b3b80d8
* Split StringMapEntry construction out of StringMap, into StringMapEntry.Chris Lattner2007-02-111-28/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34170 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename CStringMap -> StringMap, since it now supports nul characters in theChris Lattner2007-02-081-17/+17
| | | | | | | 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-28/+57
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34062 91177308-0d34-0410-b5e6-96231b3b80d8
* add a methodChris Lattner2006-10-301-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31288 91177308-0d34-0410-b5e6-96231b3b80d8
* add newline at end of fileChris Lattner2006-10-291-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31287 91177308-0d34-0410-b5e6-96231b3b80d8
* add a highly efficient hash table that is specialized for mapping C stringsChris Lattner2006-10-291-0/+144
to some other type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31286 91177308-0d34-0410-b5e6-96231b3b80d8