summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
* Only include move-related Optional<T> tests when rvalue references are ↵David Blaikie2013-02-211-30/+32
| | | | | | available. llvm-svn: 175730
* Add move ctor/assignment to Optional<T>David Blaikie2013-02-211-0/+109
| | | | | | Code review feedback for r175580 by Jordan Rose. llvm-svn: 175729
* Move the SplatByte helper to APInt and generalize it a bit.Benjamin Kramer2013-02-201-0/+10
| | | | llvm-svn: 175621
* Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.David Blaikie2013-02-201-1/+1
| | | | | | Code review feedback on r175580 from Jordan Rose. llvm-svn: 175595
* Allow llvm::Optional to work with types without default constructors.David Blaikie2013-02-202-0/+174
| | | | | | | | | This generalizes Optional to require less from the T type by using aligned storage for backing & placement new/deleting the T into it when necessary. Also includes unit tests. llvm-svn: 175580
* Remove my bogus MapVector::erase() with a narrower ::pop_back(), and add a ↵Douglas Gregor2013-02-191-1/+15
| | | | | | unit test. llvm-svn: 175538
* ADT: Correct APInt::getActiveWords for zero valuesMeador Inge2013-02-071-0/+8
| | | | | | | | | | PR15138 was opened because of a segfault in the Bitcode writer. The actual issue ended up being a bug in APInt where calls to APInt::getActiveWords returns a bogus value when the APInt value is 0. This patch fixes the problem by ensuring that getActiveWords returns 1 for 0 valued APInts. llvm-svn: 174641
* [Support][ErrorOr] Add support for convertable types.Michael J. Spencer2013-02-061-0/+13
| | | | | | Thanks to Andrew, David, and Aaron for helping fix this. llvm-svn: 174552
* Revert "[Support][ErrorOr] Add support for convertable types."Andrew Trick2013-02-051-11/+0
| | | | | | | | | This reverts commit a33e1fafac7fedb1b080ef07ddf9ad6ddff3a830. This unit test crashes on Darwon. It needs to be temporarily reverted to unblock the test infrastructure. llvm-svn: 174458
* [Support][ErrorOr] Add support for convertable types.Michael J. Spencer2013-02-051-0/+11
| | | | llvm-svn: 174357
* Change GetPointerBaseWithConstantOffset's DataLayout argument from aDan Gohman2013-01-311-4/+4
| | | | | | | reference to a pointer, so that it can handle the case where DataLayout is not available and behave conservatively. llvm-svn: 174024
* Added a unit test for r173983 that verifies that Target.isiOS() works correctly.Michael Gottesman2013-01-301-0/+30
| | | | | | | As a bonus I put in some extra checks to make sure that we are identifying the machine word of various Mac OS X/iOS targets appropriately. llvm-svn: 173994
* Add support for source and line information to IntelJITEventListener for ↵Andrew Kaylor2013-01-282-1/+3
| | | | | | object emitted by MCJIT. llvm-svn: 173712
* Fix test to not use the AttributeSet's AttributeWithIndex creation method.Bill Wendling2013-01-271-5/+5
| | | | llvm-svn: 173608
* Add file to CMakeLists (file added in r173505)Dmitri Gribenko2013-01-251-0/+1
| | | | llvm-svn: 173513
* Add an insert() method to MapVector. Adds the first MapVector unit test.Nick Lewycky2013-01-251-0/+41
| | | | llvm-svn: 173505
* APFloat: Make sure that we get a well-formed x87 NaN when converting from a ↵Benjamin Kramer2013-01-251-0/+26
| | | | | | | | smaller type. Fixes PR15054. llvm-svn: 173459
* unittests/SupportTests/Initialize.MultipleThreads: Enable ↵NAKAMURA Takumi2013-01-241-0/+2
| | | | | | | | | pthread_attr_setstack(3) only on Linux. I got blamed on darwin11; unittests/Support/ManagedStatic.cpp:35: error: 'pthread_attr_setstack' was not declared in this scope llvm-svn: 173355
* unittests/SupportTests/Initialize.MultipleThreads: Appease --vg-leak to ↵NAKAMURA Takumi2013-01-241-2/+17
| | | | | | allocate stack explicitly for glibc. llvm-svn: 173350
* llvm/unittests: Use OwningPtr to fix --vg-leak.NAKAMURA Takumi2013-01-234-6/+11
| | | | llvm-svn: 173240
* IRTests/WaymarkTest.cpp: Fix in --vg-leak.NAKAMURA Takumi2013-01-231-0/+2
| | | | llvm-svn: 173239
* IRTests/IRBuilderTest.cpp: GetIntTy: Delete DL at yourself since it is not ↵NAKAMURA Takumi2013-01-231-0/+1
| | | | | | linked. llvm-svn: 173238
* IRTests/IRBuilderTest.cpp: Let GV added to the module.NAKAMURA Takumi2013-01-231-2/+2
| | | | | | It fixes --vg-leak. llvm-svn: 173237
* IRTests/ConstantsTest.cpp: AsInstructionsTest: Delete each instruction ↵NAKAMURA Takumi2013-01-231-6/+8
| | | | | | immediately if it is not linked. llvm-svn: 173236
* Untabify.NAKAMURA Takumi2013-01-231-5/+5
| | | | llvm-svn: 173235
* Whitespace.NAKAMURA Takumi2013-01-231-1/+1
| | | | llvm-svn: 173234
* DominatorTreeTest.cpp: Add the file header.NAKAMURA Takumi2013-01-231-0/+9
| | | | llvm-svn: 173233
* [Support][ErrorOr] Add optimized specialization of ErrorOr<void>.Michael J. Spencer2013-01-231-0/+11
| | | | | | | | ErrorOr<void> represents an operation that returns nothing, but can still fail. It should be used in cases where you need the aditional user data that ErrorOr provides over error_code. llvm-svn: 173209
* ADT/SparseMultiSetTest.cpp: Try to appease cygwin-clang on stage2, take two. ↵NAKAMURA Takumi2013-01-221-1/+1
| | | | | | [-Wsign-compare] llvm-svn: 173144
* ADT/SparseMultiSetTest.cpp: Try to appease cygwin-clang (libstdc++-4.5) on ↵NAKAMURA Takumi2013-01-221-2/+2
| | | | | | stage2. [-Wsign-compare] llvm-svn: 173127
* ErrorOrTest.cpp: Check existence of EXPECT_DEBUG_DEATH. It is not always ↵NAKAMURA Takumi2013-01-221-0/+2
| | | | | | available. llvm-svn: 173123
* Introduce a new data structure, the SparseMultiSet, and changes to the MI ↵Michael Ilseman2013-01-212-0/+236
| | | | | | | | scheduler to use it. A SparseMultiSet adds multiset behavior to SparseSet, while retaining SparseSet's desirable properties. Essentially, SparseMultiSet provides multiset behavior by storing its dense data in doubly linked lists that are inlined into the dense vector. This allows it to provide good data locality as well as vector-like constant-time clear() and fast constant time find(), insert(), and erase(). It also allows SparseMultiSet to have a builtin recycler rather than keeping SparseSet's behavior of always swapping upon removal, which allows it to preserve more iterators. It's often a better alternative to a SparseSet of a growable container or vector-of-vector. llvm-svn: 173064
* [Support] Make test C++03.Michael J. Spencer2013-01-211-4/+2
| | | | llvm-svn: 173004
* Disable test that fails due to lack of std::true_type in C++03.Benjamin Kramer2013-01-201-0/+2
| | | | | | Michael, can this test be ported to C++03? llvm-svn: 172996
* [Support] Port ErrorOr<T> from lld to C++03.Michael J. Spencer2013-01-202-0/+79
| | | | llvm-svn: 172991
* Introduce llvm::sys::getProcessTriple() function.Peter Collingbourne2013-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In r143502, we renamed getHostTriple() to getDefaultTargetTriple() as part of work to allow the user to supply a different default target triple at configure time. This change also affected the JIT. However, it is inappropriate to use the default target triple in the JIT in most circumstances because this will not necessarily match the current architecture used by the process, leading to illegal instruction and other such errors at run time. Introduce the getProcessTriple() function for use in the JIT and its clients, and cause the JIT to use it. On architectures with a single bitness, the host and process triples are identical. On other architectures, the host triple represents the architecture of the host CPU, while the process triple represents the architecture used by the host CPU to interpret machine code within the current process. For example, when executing 32-bit code on a 64-bit Linux machine, the host triple may be 'x86_64-unknown-linux-gnu', while the process triple may be 'i386-unknown-linux-gnu'. This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple platforms. Differential Revision: http://llvm-reviews.chandlerc.com/D254 llvm-svn: 172627
* Allow vectors in CreatePointerCast of constants.Evgeniy Stepanov2013-01-161-0/+30
| | | | llvm-svn: 172615
* A test for r172535.Evgeniy Stepanov2013-01-161-0/+8
| | | | llvm-svn: 172614
* Improve r172464: const_cast is not needed if the variable is not constDmitri Gribenko2013-01-141-3/+2
| | | | llvm-svn: 172474
* Fix CastsDavid Greene2013-01-141-1/+2
| | | | | | Use const_cast<> to avoid cast-away-const errors. llvm-svn: 172464
* Add a unit test to verifies that attribute uniquing works so it doesn't ↵Benjamin Kramer2013-01-122-0/+35
| | | | | | | | break again. The folding set details can be subtle and broke twice in the last couple of weeks. llvm-svn: 172313
* Fix bug in exception table allocation (PR13678)Eli Bendersky2013-01-111-3/+50
| | | | | | Patch by Michael Muller. llvm-svn: 172214
* Replace memcpys by a static_cast and an integral promotion.Dmitri Gribenko2013-01-101-6/+4
| | | | llvm-svn: 172108
* Fix coding styleDmitri Gribenko2013-01-101-5/+3
| | | | llvm-svn: 172107
* Unbreak tests after regression from r172081.Jakub Staszak2013-01-101-0/+2
| | | | llvm-svn: 172105
* Fix Alias BugDavid Greene2013-01-101-4/+12
| | | | | | | Use memcpy to do type punning instead of a cast. A cast or similar operation through a union breaks strict aliasing rules. llvm-svn: 172081
* Implement APFloat::isDenormal()Shuxin Yang2013-01-071-0/+52
| | | | llvm-svn: 171764
* Rename the VMCore unittest tree to IR. Somehow was missed when doing theChandler Carruth2013-01-0716-16/+16
| | | | | | library rename. llvm-svn: 171747
* Move CallGraphSCCPass.h into the Analysis tree; that's where theChandler Carruth2013-01-071-1/+1
| | | | | | implementation lives already. llvm-svn: 171746
* Rename the unittest from ArrayRecylerTest.cpp to ArrayRecyclerTest.cpp.Chandler Carruth2013-01-051-0/+0
| | | | | | | Fixes the CMake build. It took me cutting and pasting this before I managed to see the missing character. =] llvm-svn: 171589
OpenPOWER on IntegriCloud