summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
* Support/PathV2: Change most functions in the path namespace to return their workMichael J. Spencer2010-12-07
| | | | | | via their return value instead of an out parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121149 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Fix warning in gtest header used by unit tests.Frits van Bommel2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121127 91177308-0d34-0410-b5e6-96231b3b80d8
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-07
| | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121120 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/CMakeLists.txt: Tweak unittests' layout to be identical to GNU build.NAKAMURA Takumi2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121117 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Remove the error_code return type from all functions in the pathMichael J. Spencer2010-12-07
| | | | | | | namespace. None of them return anything except for success anyway. These will be converted to returning their result soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121109 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Move make_absolute from path to fs.Michael J. Spencer2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121108 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add directory_iterator implementation.Michael J. Spencer2010-12-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120989 91177308-0d34-0410-b5e6-96231b3b80d8
* Unittests/Support/PathV2: Add FileSystem tests.Michael J. Spencer2010-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120888 91177308-0d34-0410-b5e6-96231b3b80d8
* Add IntervalMap::iterator::set{Start,Stop,Value} methods that allow limitedJakob Stoklund Olesen2010-12-03
| | | | | | | | | | | editing of the current interval. These methods may cause coalescing, there are corresponding set*Unchecked methods for editing without coalescing. The non-coalescing methods are useful for applying monotonic transforms to all keys or values in a map without accidentally coalescing transformed and untransformed intervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120829 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add remove implementation.Michael J. Spencer2010-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120817 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/PathV2: remove(3) requires a terminated string.Benjamin Kramer2010-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120803 91177308-0d34-0410-b5e6-96231b3b80d8
* Unittests/Support/PathV2: Cleanup and remove output.Michael J. Spencer2010-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120785 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/PathV2: Comment out test because some systems are saying thatMichael J. Spencer2010-12-03
| | | | | | a file exists when it shouldn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120784 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add unique_file and exists implementations.Michael J. Spencer2010-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120776 91177308-0d34-0410-b5e6-96231b3b80d8
* Make valgrind happy.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120616 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/ADT/Twine: Add toNullTerminatedStringRef.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120600 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/PathV2: Fix -pedantic warning.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120590 91177308-0d34-0410-b5e6-96231b3b80d8
* PR5207: Rename overloaded APInt methods set(), clear(), flip() toJay Foad2010-12-01
| | | | | | setAllBits(), setBit(unsigned), etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120564 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add is_{absolute,relative} implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120560 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add ↵Michael J. Spencer2010-12-01
| | | | | | has_{root_path,root_name,root_directory,parent_path,filename,stem,extension} implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120559 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/PathV2: Make tests much shorter; although harder to ↵Michael J. Spencer2010-12-01
| | | | | | | | | understand. I'm going to replace this all anyway with a proper table and separated tests when done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120558 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add extension implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120550 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add stem implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120547 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add filename implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120546 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add native implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120539 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add replace_extension implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120514 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add remove_filename implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120513 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Implement reverse iteration and parent_path.Michael J. Spencer2010-11-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120496 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Fix 80 col.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120349 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests: Merge SystemTests back into SupportTests.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120330 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: Add PathV2 implementation.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120329 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
* Disallow overlapping inserts, even when inserting the same value.Jakob Stoklund Olesen2010-11-28
| | | | | | | | | | | We always disallowed overlapping inserts with different values, and this makes the insertion code smaller and faster. If an overwriting insert is needed, it can be added as a separate method that trims any existing intervals before inserting. The immediate use cases for IntervalMap don't need this - they only use disjoint insertions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120264 91177308-0d34-0410-b5e6-96231b3b80d8
* Add default constructors for iterators.Jakob Stoklund Olesen2010-11-28
| | | | | | | These iterators don't point anywhere, and they can't be compared to anything. They are only good for assigning to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120239 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement const_iterator::advanceTo().Jakob Stoklund Olesen2010-11-28
| | | | | | | This is a version of find() that always searches forwards and is faster for local searches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120237 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more tests for erase(). Fix a few exposed bugs.Jakob Stoklund Olesen2010-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120227 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test case with randomly ordered insertions, massive coalescing.Jakob Stoklund Olesen2010-11-27
| | | | | | | | | | Implement iterator::erase() in a simple version that erases nodes when they become empty, but doesn't try to redistribute elements among siblings for better packing. Handle coalescing across leaf nodes which may require erasing entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120226 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/JITTests: Don't use --export-dynamic but --export-all-symbols on ↵NAKAMURA Takumi2010-11-26
| | | | | | | | | | | | | cygming. GNU ld/PECOFF accepts but ignores them below; --version-script --export-dynamic --rpath FIXME: autoconf should be aware of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120179 91177308-0d34-0410-b5e6-96231b3b80d8
* Add B+-tree test case that creates a height 3 tree with a smaller root node.Jakob Stoklund Olesen2010-11-26
| | | | | | Change temporary debugging code to write a dot file directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120171 91177308-0d34-0410-b5e6-96231b3b80d8
* google test depends on Support.Michael J. Spencer2010-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120105 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests: Add initial Path-V2 test.Michael J. Spencer2010-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120103 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests: Add SystemTests.Michael J. Spencer2010-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120101 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak ImmutableMap/ImmutableSet/ImmutableList APIsTed Kremenek2010-11-24
| | | | | | | | | | to use lowercase letters for the start of most method names and to replace some method names with more descriptive names (e.g., "getLeft()" instead of "Left()"). No real functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120070 91177308-0d34-0410-b5e6-96231b3b80d8
* reimplement SwapByteOrder.h in terms of overloading instead of Chris Lattner2010-11-23
| | | | | | | being in terms of excessively complex template logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119992 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement IntervalMap::clear().Jakob Stoklund Olesen2010-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119872 91177308-0d34-0410-b5e6-96231b3b80d8
* Support backwards iteration starting from end().Jakob Stoklund Olesen2010-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119871 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test for PR 8111. By Frits van Bommel.Dale Johannesen2010-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119870 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ADT/IntervalMap.Jakob Stoklund Olesen2010-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a sorted interval map data structure for small keys and values with automatic coalescing and bidirectional iteration over coalesced intervals. Except for coalescing intervals, it provides similar functionality to std::map. It is however much more compact for small keys and values, and hopefully faster too. The container object itself can hold the first few intervals without any allocations, then it switches to a cache conscious B+-tree representation. A recycling allocator can be shared between many containers, even between containers holding different types. The IntervalMap is initially intended to be used with SlotIndex intervals for: - Backing store for LiveIntervalUnion that is smaller and faster than std::set. - Backing store for LiveInterval with less overhead than std::vector for typical intervals and O(N log N) merging of large intervals. 99% of virtual registers need 4 entries or less and would benefit from the small object optimization. - Backing store for LiveDebugVariable which doesn't exist yet, but will track debug variables during register allocation. This is a work in progress. Missing items are: - Performance metrics. - erase(). - insert() shrinkage. - clear(). - More performance metrics. - Simplification and detemplatization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119787 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/CMakeLists.txt: [PR8225] Tweak linking JITTests on MSVC to add ↵NAKAMURA Takumi2010-11-19
| | | | | | | | JITTests.def. CMake can pass *.def to link.exe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119783 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/CMakeLists.txt: Suppress building ValueMapTest on MSVC older than ↵NAKAMURA Takumi2010-11-19
| | | | | | | | | 10(VS2010). MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug. See issue#331418 in Visual Studio. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119782 91177308-0d34-0410-b5e6-96231b3b80d8