summaryrefslogtreecommitdiff
path: root/unittests/ADT/StringMapTest.cpp
Commit message (Collapse)AuthorAge
* Fix break introduced in r198377 due to using a local type as a template ↵David Blaikie2014-01-03
| | | | | | parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198379 91177308-0d34-0410-b5e6-96231b3b80d8
* Test coverage for non-default-constructible elements in a StringMapDavid Blaikie2014-01-02
| | | | | | | | | This functionality was enabled by r198374. Here's a test to ensure it works and we don't regress it. Based on a patch by Maciej Piechotka. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198377 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove StringMapEntryInitializer support.David Blaikie2014-01-02
| | | | | | | It was never specialized so let's just remove that unused configurability and always do the default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198374 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR13148, an inf-loop in StringMap.Chandler Carruth2012-06-19
| | | | | | | | | | | | | | | StringMap suffered from the same bug as DenseMap: when you explicitly construct it with a small number of buckets, you can arrange for the tombstone-based growth path to be followed when the number of buckets was less than '8'. In that case, even with a full map, it would compare '0' as not less than '0', and refuse to grow the table, leading to inf-loops trying to find an empty bucket on the next insertion. The fix is very simple: use '<=' as the comparison. The same fix was applied to DenseMap as well during its recent refactoring. Thanks to Alex Bolz for the great report and test case. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158725 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some superfluous SCOPED_TRACEs from this unit test.Chandler Carruth2012-06-19
| | | | | | | GoogleTest already prints errors with all the information about which test case contained the error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158724 91177308-0d34-0410-b5e6-96231b3b80d8
* The key of a StringMap can contain nul's in it, so having first() returnChris Lattner2011-07-14
| | | | | | | const char* doesn't make sense. Have it return StringRef instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135167 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix (harmless) memory leak found by memcheck.Jeffrey Yasskin2010-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95862 91177308-0d34-0410-b5e6-96231b3b80d8
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-26
| | | | | | | direct inclusion edge from System to Support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert StringMap to using StringRef for its APIs.Daniel Dunbar2009-07-23
| | | | | | | | | | | | | - 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
* unbreak unit-tests on gcc-4.4.Torok Edwin2009-07-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76542 91177308-0d34-0410-b5e6-96231b3b80d8
* Some generic clean-ups. Also make the StringMapEntryInitializer ↵Bill Wendling2009-01-08
| | | | | | specialization apply only to the tests that are actually testing it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61923 91177308-0d34-0410-b5e6-96231b3b80d8
* * Don't explicitly cast "0" to "void*". This doesn't work well with specializedBill Wendling2009-01-08
| | | | | | | | | | 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
* 80-column violation fix.Bill Wendling2009-01-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61919 91177308-0d34-0410-b5e6-96231b3b80d8
* * Added unittests for StringMapMisha Brukman2009-01-08
* 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