summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* add dyn_cast_or_null tests, exclude invalid dyn_cast testGabor Greif2010-07-221-8/+25
| | | | llvm-svn: 109111
* tidy upGabor Greif2010-07-221-13/+9
| | | | llvm-svn: 109110
* add dyn_cast tests and beef up others a bitGabor Greif2010-07-221-5/+34
| | | | llvm-svn: 109109
* tidy upGabor Greif2010-07-201-5/+3
| | | | llvm-svn: 108889
* migrate essentially everything from under #ifdef DEBUG_CAST_OPERATORS into ↵Gabor Greif2010-07-201-7/+55
| | | | | | this file llvm-svn: 108864
* extend to cast<> and cast_or_null<> testsGabor Greif2010-07-201-3/+31
| | | | llvm-svn: 108854
* isa<> testsGabor Greif2010-07-201-1/+7
| | | | llvm-svn: 108851
* initial checkin for unittest to exercise Support/Casting.hGabor Greif2010-07-201-0/+32
| | | | | | | this is still minimal on purpose, but I plan to migrate the ugly hack under #ifdef DEBUG_CAST_OPERATORS into this file llvm-svn: 108849
* Fix death tests in -Asserts builds.Jeffrey Yasskin2010-03-171-0/+2
| | | | llvm-svn: 98701
* Spelling fixes.Dan Gohman2010-03-011-1/+1
| | | | llvm-svn: 97454
* Add Regex::sub, for doing regular expression substitution with backreferences.Daniel Dunbar2010-02-171-0/+29
| | | | llvm-svn: 96503
* Add support for TypeBuilder<const/volatile void*, false>.Jeffrey Yasskin2010-02-091-1/+8
| | | | | | Thanks to Jochen Wilhelmy for the suggestion! llvm-svn: 95677
* Fix TimeValue::now() on Unix.Torok Edwin2010-01-221-0/+16
| | | | | | | | | TimeValue()::now().toEpochTime() is supposed to be the same as time(), but it wasn't, because toEpoch subtracted PosixZeroTime, but now() didn't add PosixZeroTime! Add a unittest to check this works. llvm-svn: 94178
* 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
OpenPOWER on IntegriCloud