summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
* Remove / use flags that are now set in the Makefile.config.Julien Lerouge2009-10-261-1/+1
| | | | llvm-svn: 85149
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-261-1/+1
| | | | | | direct inclusion edge from System to Support. llvm-svn: 85086
* Fix http://llvm.org/PR4822: allow module deletion after a function has beenJeffrey Yasskin2009-10-232-3/+30
| | | | | | | | | | | | | | compiled. When functions are compiled, they accumulate references in the JITResolver's stub maps. This patch removes those references when the functions are destroyed. It's illegal to destroy a Function when any thread may still try to call its machine code. This patch also updates r83987 to use ValueMap instead of explicit CallbackVHs and fixes a couple "do stuff inside assert()" bugs from r84522. llvm-svn: 84975
* Fix stylistic and documentation problems in ValueMap found by Nick Lewycky andJeffrey Yasskin2009-10-231-3/+3
| | | | | | Evan Cheng. llvm-svn: 84967
* Try r84890 again (adding ValueMap<>), now that I've tested the compile onJeffrey Yasskin2009-10-221-0/+291
| | | | | | gcc-4.4. llvm-svn: 84902
* Revert r84890, which broke the linux build.Jeffrey Yasskin2009-10-221-291/+0
| | | | llvm-svn: 84892
* Add a ValueMap<ValueOrSubclass*, T> type. ValueMap<Value*, T> is safe to useJeffrey Yasskin2009-10-221-0/+291
| | | | | | | | | | | | even when keys get RAUWed and deleted during its lifetime. By default the keys act like WeakVHs, but users can pass a third template parameter to configure how updates work and whether to do anything beyond updating the map on each action. It's also possible to automatically acquire a lock around ValueMap updates triggered by RAUWs and deletes, to support the ExecutionEngine. llvm-svn: 84890
* Move the Function*->allocated blocks map from the JITMemoryManager to theJeffrey Yasskin2009-10-201-38/+39
| | | | | | | | | | | | | | | JITEmitter. I'm gradually making Functions auto-remove themselves from the JIT when they're destroyed. In this case, the Function needs to be removed from the JITEmitter, but the map recording which Functions need to be removed lived behind the JITMemoryManager interface, which made things difficult. This patch replaces the deallocateMemForFunction(Function*) method with a pair of methods deallocateFunctionBody(void *) and deallocateExceptionTable(void *) corresponding to the two startFoo/endFoo pairs. llvm-svn: 84651
* PowerPC ifdef'ing considered more complicated than one might like.Daniel Dunbar2009-10-201-1/+1
| | | | llvm-svn: 84603
* Correct test for PowerPC.Nick Lewycky2009-10-201-1/+1
| | | | llvm-svn: 84595
* Also check for __POWERPC__ when skipping these tests.Daniel Dunbar2009-10-191-1/+1
| | | | llvm-svn: 84482
* Add raw_ostream::write_escaped, for writing escaped strings.Daniel Dunbar2009-10-171-0/+16
| | | | llvm-svn: 84355
* Disable another unittest that doesn't work on arm and ppc.Benjamin Kramer2009-10-151-1/+1
| | | | llvm-svn: 84186
* The ARM and PowerPC jits are broken in this regard.Nick Lewycky2009-10-141-0/+2
| | | | llvm-svn: 84128
* Keep track of stubs that are created. This fixes PR5162 and probably PR4822 andJeffrey Yasskin2009-10-131-0/+96
| | | | | | 4406. Patch by Nick Lewycky! llvm-svn: 84032
* Make the ExecutionEngine automatically remove global mappings on when theirJeffrey Yasskin2009-10-131-0/+13
| | | | | | | GlobalValue is destroyed. Function destruction still leaks machine code and can crash on leaked stubs, but this is some progress. llvm-svn: 83987
* Pacify the compiler (signed with unsigned comparison) by makingDuncan Sands2009-10-131-6/+6
| | | | | | these constants unsigned. llvm-svn: 83962
* Add a ceilLogBase2 function to APInt.Dan Gohman2009-10-131-0/+11
| | | | llvm-svn: 83932
* 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
* ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverseJeffrey Yasskin2009-10-091-0/+20
| | | | | | | mappings, which could cause errors and assert-failures. This patch fixes that, adds a test, and refactors the global-mapping-removal code into a single place. llvm-svn: 83678
* Fix illegal cross-type aliasing. Found by baldrick on a newer gcc.Jeffrey Yasskin2009-10-061-6/+4
| | | | llvm-svn: 83401
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-062-6/+6
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* Fix http://llvm.org/PR5116 by rolling back r60822. This passes `make unittestsJeffrey Yasskin2009-10-061-0/+53
| | | | | | check-lit` on both x86-64 Linux and x86-32 Darwin. llvm-svn: 83353
* Try to fix unit test linking on linux ...Benjamin Kramer2009-10-021-2/+2
| | | | llvm-svn: 83252
* MingW build fixesBenjamin Kramer2009-10-021-1/+1
| | | | | | | | | | - MingW needs -lpsapi (in ${LIBS}) linked after -lLLVMSystem. Noticed by Ronald Pijnacker! - Some parts of the System library must be build with exceptions on windows. Based on a patch by Jay Foad! llvm-svn: 83251
* New unit test for the cloning module, which so far only covers cloning ofNick Lewycky2009-09-274-1/+120
| | | | | | instructions' optimization flags. llvm-svn: 82934
* Link order: it matters.Nick Lewycky2009-09-271-1/+1
| | | | llvm-svn: 82925
* 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
* Fix a few more conversion warnings on 4.0Daniel Dunbar2009-09-181-5/+5
| | | | llvm-svn: 82232
* Another try at fixing compile warnings on 4.0Daniel Dunbar2009-09-171-18/+18
| | | | llvm-svn: 82148
* Add StringRef::{rfind, rsplit}Daniel Dunbar2009-09-161-42/+90
| | | | llvm-svn: 82087
* 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
* Attempt to fix some 4.0.0 build warnings.Daniel Dunbar2009-09-141-23/+23
| | | | llvm-svn: 81752
* Build (not test) the unittests as part of a normal build.Daniel Dunbar2009-09-131-0/+2
| | | | | | | - 'make unittests' still builds and tests. - 'make unitcheck' inside a unittest directory runs the tests in that directory. llvm-svn: 81725
* Move unittest driver to utils/unittest/UnitTestMain.Daniel Dunbar2009-09-132-22/+0
| | | | | | | - This eliminates a race between building the unittests and linking the UnitTestMain library. llvm-svn: 81719
* Revert unittests build changes temporarily, the unit test build isn't -j safe.Daniel Dunbar2009-09-131-2/+0
| | | | llvm-svn: 81692
* Build (not test) the unittests as part of a normal build.Daniel Dunbar2009-09-131-0/+2
| | | | | | | - 'make unittests' still builds and tests. - 'make unitcheck' inside a unittest directory runs the tests in that directory. llvm-svn: 81687
* 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
* Update unittests for MDNode uniquing disable.Daniel Dunbar2009-09-071-0/+4
| | | | llvm-svn: 81142
* Simplify, now that gtest supports raw_ostream directly.Daniel Dunbar2009-09-062-9/+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 test for PR4873, which works for me.Daniel Dunbar2009-09-031-0/+8
| | | | llvm-svn: 80965
* Now Bitcode reader bug is fixed. Reapply 80839.Devang Patel2009-09-031-1/+1
| | | | | | | | Use CallbackVH, instead of WeakVH, to hold MDNode elements. Use FoldingSetNode to unique MDNodes in a context. Use CallbackVH hooks to update context's MDNodeSet appropriately. llvm-svn: 80868
* Revert 80839 for now. It causes test failures.Devang Patel2009-09-021-1/+1
| | | | llvm-svn: 80841
* Use CallbackVH, instead of WeakVH, to hold MDNode elements. Devang Patel2009-09-021-1/+1
| | | | | | | Use FoldingSetNode to unique MDNodes in a context. Use CallbackVH hooks to update context's MDNodeSet appropriately. llvm-svn: 80839
* Disable uniqueness test for now.Devang Patel2009-09-021-1/+1
| | | | llvm-svn: 80741
OpenPOWER on IntegriCloud