summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support
Commit message (Collapse)AuthorAgeFilesLines
* Catch more cases of a pointer being marked garbage twice. This helps whenRafael Espindola2009-12-181-0/+29
| | | | | | debugging some leaks (PR5770 in particular). llvm-svn: 91713
* Type.h doesn't need to #include LLVMContext.hChris Lattner2009-10-271-0/+1
| | | | llvm-svn: 85254
* Add raw_ostream::write_escaped, for writing escaped strings.Daniel Dunbar2009-10-171-0/+16
| | | | llvm-svn: 84355
* Fix http://llvm.org/PR5160, to let CallbackVHs modify other ValueHandles on theJeffrey Yasskin2009-10-121-0/+81
| | | | | | same Value without breaking things. llvm-svn: 83861
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-5/+5
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* remove support for "NoSub" from regex. It seems like a minor optimizationChris Lattner2009-09-261-4/+4
| | | | | | and makes the API more annoying. Add a Regex::getNumMatches() method. llvm-svn: 82877
* Fix a compile failure introduced by r82675 on MinGW which doesn't haveJeffrey Yasskin2009-09-251-0/+12
| | | | | | | setenv(). This patch just disables the test rather than getting putenv() to work. Thanks to Sandeep Patel for reporting the problem. llvm-svn: 82797
* add and document regex support for FileCheck. You can now do stuff like:Chris Lattner2009-09-241-0/+1
| | | | | | | | ; CHECK: movl {{%e[a-z][xi]}}, %eax or whatever. llvm-svn: 82717
* Roll back r82348, which introduced an infinite loop in ParseCStringVector() thatJeffrey Yasskin2009-09-241-0/+48
| | | | | | | a trivial unittest would have caught. This revision also adds the trivial unittest. llvm-svn: 82675
* Drop the raw_ostream required buffer size to 1.Daniel Dunbar2009-09-151-0/+10
| | | | | | | - As best I can tell, we have eliminated all the code which used to require a larger buffer size. llvm-svn: 81912
* Make TypeBuilder's result depend on the LLVMContext it's passed.Jeffrey Yasskin2009-09-091-0/+12
| | | | | | | | TypeBuilder was using a local static variable to cache its result. This made it ignore changes in its LLVMContext argument and always return a type constructed from the argument to the first call. llvm-svn: 81316
* Simplify, now that gtest supports raw_ostream directly.Daniel Dunbar2009-09-061-1/+0
| | | | llvm-svn: 81102
* Now that googletest can print ConstantRange, use EXPECT_EQ when testing forNick Lewycky2009-09-051-149/+149
| | | | | | | equality. Prefer EXPECT_EQ(foo, Full) over EXPECT_TRUE(foo.isFullSet()) because the former will print out the contents of the constant range that failed. llvm-svn: 81094
* Teach googletest to use raw_ostream instead of just std::ostream.Jeffrey Yasskin2009-09-051-7/+0
| | | | | | | | This can break when there are implicit conversions from types raw_ostream understands but std::ostream doesn't, but it increases the number of cases that Just Work. llvm-svn: 81093
* Add regular expression matching support, based on OpenBSD regexec()/regcomp()Torok Edwin2009-08-301-0/+64
| | | | | | implementation. llvm-svn: 80493
* split raw_os_ostream out to its own header and implementation file. ThisChris Lattner2009-08-241-1/+1
| | | | | | | means that raw_ostream no longer has to #include <iosfwd>. Nothing in llvm should use raw_os_ostream.h, but llvm-gcc and some unit tests do. llvm-svn: 79886
* Unbreak unit tests.Daniel Dunbar2009-08-241-0/+7
| | | | llvm-svn: 79879
* 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
OpenPOWER on IntegriCloud