summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix off-by-one in llvm::Format::print.Daniel Dunbar2009-08-231-0/+27
| | | | | | | | | | | | | - This also shortens the Format.h implementation, and uses the print buffer fully (it was wasting a character). - This manifested as llvm-test failures, because one side effect was that raw_ostream would write garbage '\x00' values into the output stream if it happened that the string was at the end of the buffer. This meant that grep would report 'Binary file matches', which meant the silly pattern matching llvm-test eventually does would fail. Cute. :) llvm-svn: 79862
* convert all the constant range EXPECT_EQ tests to use EXPECT_TRUE since Chris Lattner2009-08-231-128/+129
| | | | | | ConstantRange doesn't have an std::ostream inserter anymore. llvm-svn: 79831
* Fixed header comment.Misha Brukman2009-08-201-1/+1
| | | | llvm-svn: 79536
* Add min and max tests.Daniel Dunbar2009-08-191-0/+8
| | | | llvm-svn: 79454
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-132-71/+71
| | | | llvm-svn: 78948
* Fix unit test on FreeBSD. We need to make sure there is enough space to save ↵Benjamin Kramer2009-08-121-1/+1
| | | | | | the pointer even if the memory returned from malloc was already aligned. llvm-svn: 78805
* To catch bugs like the one fixed inJeffrey Yasskin2009-08-071-0/+7
| | | | | | | | | | | | | http://llvm.org/viewvc/llvm-project?view=rev&revision=78127, I'm changing the ExecutionEngine's global mappings to hold AssertingVH<const GlobalValue>. That way, if unregistering a mapping fails to actually unregister it, we'll get an assert. Running the jit nightly tests didn't uncover any actual instances of the problem. This also uncovered the fact that AssertingVH<const X> didn't work, so I fixed that too. llvm-svn: 78400
* Update unit test.Owen Anderson2009-08-051-5/+5
| | | | llvm-svn: 78260
* Update unittest for LLVM API change.Benjamin Kramer2009-07-311-3/+3
| | | | llvm-svn: 77730
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-1/+1
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+2
| | | | llvm-svn: 77516
* Added a test and fixed a bug in BumpPtrAllocator relating to large alignmentReid Kleckner2009-07-251-0/+48
| | | | | | values. Hopefully this fixes PR4622. llvm-svn: 77088
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-1/+1
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Re-committing changes from r76825 to BumpPtrAllocator with a fix and tests forReid Kleckner2009-07-231-0/+95
| | | | | | an off-by-one error. llvm-svn: 76891
* Reverting r76825 and r76828, since they caused clang runtime errors and some ↵Reid Kleckner2009-07-231-61/+0
| | | | | | build failure involving memset. llvm-svn: 76838
* Parameterize the BumpPtrAllocator over a slab allocator. It defaults to usingReid Kleckner2009-07-231-0/+61
| | | | | | | | | | | malloc, so there should be no functional changes to other code. These changes are necessary since I have plans to use this allocator in the JIT memory manager, and it needs a special allocator. I also added some tests which helped me pinpoint some bugs. llvm-svn: 76825
* cast signed APInt constructor params to uint64_t to suppress signedness warningRyan Flynn2009-07-221-5/+5
| | | | llvm-svn: 76744
* Fix ConstantRange::unionWith. Also make it work a little hard in some cases toNick Lewycky2009-07-191-0/+11
| | | | | | | return the smallest union of two ranges instead of just any range that happens to contain the union. llvm-svn: 76360
* Replace intersectWith with maximalIntersectWith. The latter guarantees thatNick Lewycky2009-07-181-15/+6
| | | | | | | | all values belonging to the intersection will belong to the resulting range. The former was inconsistent about that point (either way is fine, just pick one.) This is part of PR4545. llvm-svn: 76289
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-2/+3
| | | | llvm-svn: 75703
* Fix an error in ConstantRange::getSignedMax on wrapped ranges. Thanks onceNick Lewycky2009-07-131-0/+4
| | | | | | again to Daniel Dunbar and KLEE! llvm-svn: 75449
* 'i8 full-range' sign extended to i16 should equal [-128, 128) not [-128, 127).Nick Lewycky2009-07-131-1/+1
| | | | | | Found by Daniel Dunbar and KLEE. llvm-svn: 75448
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-6/+11
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* Multiply was very wrong for wrapped ranges. This supplies a half-fix that willNick Lewycky2009-07-131-0/+5
| | | | | | generally return Full on all wrapped inputs. "Fixes" PR4545. llvm-svn: 75444
* Fix a bug summing two full sets. The overflow checking doesn't handle sets asNick Lewycky2009-07-131-0/+1
| | | | | | | large as the full set, only those one size smaller. Thanks to Daniel Dunbar who found this bug using Klee! llvm-svn: 75443
* Implement udiv for ConstantRanges.Nick Lewycky2009-07-121-13/+9
| | | | llvm-svn: 75413
* This is not overly conservative.Nick Lewycky2009-07-121-1/+0
| | | | | | | Some = [10, 2730). A subset of that is [1024..2048) which covers every possible 10-bit pattern. llvm-svn: 75411
* Implement ConstantRange::multiply based on the code in LoopVR.Nick Lewycky2009-07-121-10/+6
| | | | llvm-svn: 75410
* Fix handling of max and full set.Nick Lewycky2009-07-111-7/+8
| | | | | | | | A full set is a constant range that represents any number. If you take the umax of that and [5, 10) you end up with [5, INT_MAX] because the values less than 5 would be umax's against a value which is at least 5. llvm-svn: 75372
* Break the world's largest unit test down a few logical lines. No semanticNick Lewycky2009-07-111-23/+65
| | | | | | changes. llvm-svn: 75369
* Fix unit tests.Owen Anderson2009-07-101-89/+90
| | | | llvm-svn: 75262
* Revert the part of 75177 that split ConstantRange into two classes, andDan Gohman2009-07-091-298/+21
| | | | | | | | merge the new functionality and unittests into ConstantRange. Thanks to Nick Lewycky for pointing out that it isn't necessary to have two separate classes here. llvm-svn: 75191
* Add a ConstantSignedRange class, which does for signed integersDan Gohman2009-07-091-0/+582
| | | | | | | | | | | | | what ConstantRange does for unsigned integers. Factor out a common base class for common functionality. Add some new functions for performing arithmetic on constant ranges. Some of these are currently just stubbed out with conservative implementations. Add unittests for ConstantRange and ConstantSignedRange. llvm-svn: 75177
* Fix a compile warning.Daniel Dunbar2009-05-181-1/+1
| | | | llvm-svn: 71993
* Apply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from meDan Gohman2009-05-021-0/+136
| | | | | | | to make the copy constructor and destructor protected, and corresponding adjustments to the unittests. llvm-svn: 70644
* Add tests for WeakVH and AssertingVH. These pointed out that the overloads forJeffrey Yasskin2009-04-271-0/+181
| | | | | | | the comparison operators were not only unnecessary in the presence of the implicit conversion; they caused ambiguous overload errors. So I deleted them. llvm-svn: 70243
* Add a new TypeBuilder helper class, which eases making LLVM IR types.Chris Lattner2009-04-251-0/+233
| | | | | | Patch by Jeffrey Yasskin! llvm-svn: 70084
* Make the constants fit.Bill Wendling2009-04-011-5/+5
| | | | llvm-svn: 68258
* Added tests for math utility functions; fixed another test's header comment.Misha Brukman2009-04-012-1/+105
| | | | llvm-svn: 68249
* Renamed unittest files to have a consistent {Tt}est suffix.Misha Brukman2009-03-191-0/+0
| | | | llvm-svn: 67326
* Minimal raw_ostream unit testsDaniel Dunbar2009-03-172-0/+100
llvm-svn: 67083
OpenPOWER on IntegriCloud