summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
...
* Try r84890 again (adding ValueMap<>), now that I've tested the compile onJeffrey Yasskin2009-10-22
| | | | | | | gcc-4.4. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84902 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r84890, which broke the linux build.Jeffrey Yasskin2009-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84892 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a ValueMap<ValueOrSubclass*, T> type. ValueMap<Value*, T> is safe to useJeffrey Yasskin2009-10-22
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84890 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the Function*->allocated blocks map from the JITMemoryManager to theJeffrey Yasskin2009-10-20
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84651 91177308-0d34-0410-b5e6-96231b3b80d8
* PowerPC ifdef'ing considered more complicated than one might like.Daniel Dunbar2009-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84603 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct test for PowerPC.Nick Lewycky2009-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84595 91177308-0d34-0410-b5e6-96231b3b80d8
* Also check for __POWERPC__ when skipping these tests.Daniel Dunbar2009-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84482 91177308-0d34-0410-b5e6-96231b3b80d8
* Add raw_ostream::write_escaped, for writing escaped strings.Daniel Dunbar2009-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84355 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable another unittest that doesn't work on arm and ppc.Benjamin Kramer2009-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84186 91177308-0d34-0410-b5e6-96231b3b80d8
* The ARM and PowerPC jits are broken in this regard.Nick Lewycky2009-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84128 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of stubs that are created. This fixes PR5162 and probably PR4822 andJeffrey Yasskin2009-10-13
| | | | | | | 4406. Patch by Nick Lewycky! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84032 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the ExecutionEngine automatically remove global mappings on when theirJeffrey Yasskin2009-10-13
| | | | | | | | GlobalValue is destroyed. Function destruction still leaks machine code and can crash on leaked stubs, but this is some progress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83987 91177308-0d34-0410-b5e6-96231b3b80d8
* Pacify the compiler (signed with unsigned comparison) by makingDuncan Sands2009-10-13
| | | | | | | these constants unsigned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83962 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a ceilLogBase2 function to APInt.Dan Gohman2009-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83932 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix http://llvm.org/PR5160, to let CallbackVHs modify other ValueHandles on theJeffrey Yasskin2009-10-12
| | | | | | | same Value without breaking things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83861 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverseJeffrey Yasskin2009-10-09
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83678 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix illegal cross-type aliasing. Found by baldrick on a newer gcc.Jeffrey Yasskin2009-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83401 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-06
| | | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83379 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix http://llvm.org/PR5116 by rolling back r60822. This passes `make unittestsJeffrey Yasskin2009-10-06
| | | | | | | | check-lit` on both x86-64 Linux and x86-32 Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83353 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix unit test linking on linux ...Benjamin Kramer2009-10-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83252 91177308-0d34-0410-b5e6-96231b3b80d8
* MingW build fixesBenjamin Kramer2009-10-02
| | | | | | | | | | | - 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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83251 91177308-0d34-0410-b5e6-96231b3b80d8
* New unit test for the cloning module, which so far only covers cloning ofNick Lewycky2009-09-27
| | | | | | | instructions' optimization flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82934 91177308-0d34-0410-b5e6-96231b3b80d8
* Link order: it matters.Nick Lewycky2009-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82925 91177308-0d34-0410-b5e6-96231b3b80d8
* remove support for "NoSub" from regex. It seems like a minor optimizationChris Lattner2009-09-26
| | | | | | | and makes the API more annoying. Add a Regex::getNumMatches() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82877 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a compile failure introduced by r82675 on MinGW which doesn't haveJeffrey Yasskin2009-09-25
| | | | | | | | setenv(). This patch just disables the test rather than getting putenv() to work. Thanks to Sandeep Patel for reporting the problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82797 91177308-0d34-0410-b5e6-96231b3b80d8
* add and document regex support for FileCheck. You can now do stuff like:Chris Lattner2009-09-24
| | | | | | | | | | ; CHECK: movl {{%e[a-z][xi]}}, %eax or whatever. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82717 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll back r82348, which introduced an infinite loop in ParseCStringVector() thatJeffrey Yasskin2009-09-24
| | | | | | | | | a trivial unittest would have caught. This revision also adds the trivial unittest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82675 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few more conversion warnings on 4.0Daniel Dunbar2009-09-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82232 91177308-0d34-0410-b5e6-96231b3b80d8
* Another try at fixing compile warnings on 4.0Daniel Dunbar2009-09-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82148 91177308-0d34-0410-b5e6-96231b3b80d8
* Add StringRef::{rfind, rsplit}Daniel Dunbar2009-09-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82087 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop the raw_ostream required buffer size to 1.Daniel Dunbar2009-09-15
| | | | | | | - As best I can tell, we have eliminated all the code which used to require a larger buffer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81912 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix some 4.0.0 build warnings.Daniel Dunbar2009-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81752 91177308-0d34-0410-b5e6-96231b3b80d8
* Build (not test) the unittests as part of a normal build.Daniel Dunbar2009-09-13
| | | | | | | - 'make unittests' still builds and tests. - 'make unitcheck' inside a unittest directory runs the tests in that directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81725 91177308-0d34-0410-b5e6-96231b3b80d8
* Move unittest driver to utils/unittest/UnitTestMain.Daniel Dunbar2009-09-13
| | | | | | | - This eliminates a race between building the unittests and linking the UnitTestMain library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81719 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert unittests build changes temporarily, the unit test build isn't -j safe.Daniel Dunbar2009-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81692 91177308-0d34-0410-b5e6-96231b3b80d8
* Build (not test) the unittests as part of a normal build.Daniel Dunbar2009-09-13
| | | | | | | - 'make unittests' still builds and tests. - 'make unitcheck' inside a unittest directory runs the tests in that directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81687 91177308-0d34-0410-b5e6-96231b3b80d8
* Make TypeBuilder's result depend on the LLVMContext it's passed.Jeffrey Yasskin2009-09-09
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81316 91177308-0d34-0410-b5e6-96231b3b80d8
* Update unittests for MDNode uniquing disable.Daniel Dunbar2009-09-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81142 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify, now that gtest supports raw_ostream directly.Daniel Dunbar2009-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81102 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that googletest can print ConstantRange, use EXPECT_EQ when testing forNick Lewycky2009-09-05
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81094 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach googletest to use raw_ostream instead of just std::ostream.Jeffrey Yasskin2009-09-05
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81093 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test for PR4873, which works for me.Daniel Dunbar2009-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80965 91177308-0d34-0410-b5e6-96231b3b80d8
* Now Bitcode reader bug is fixed. Reapply 80839.Devang Patel2009-09-03
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80868 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 80839 for now. It causes test failures.Devang Patel2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80841 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CallbackVH, instead of WeakVH, to hold MDNode elements. Devang Patel2009-09-02
| | | | | | | | | Use FoldingSetNode to unique MDNodes in a context. Use CallbackVH hooks to update context's MDNodeSet appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80839 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable uniqueness test for now.Devang Patel2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80741 91177308-0d34-0410-b5e6-96231b3b80d8
* update unit test for previous change.Chris Lattner2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80528 91177308-0d34-0410-b5e6-96231b3b80d8
* Add regular expression matching support, based on OpenBSD regexec()/regcomp()Torok Edwin2009-08-30
| | | | | | | implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80493 91177308-0d34-0410-b5e6-96231b3b80d8
* split raw_os_ostream out to its own header and implementation file. ThisChris Lattner2009-08-24
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79886 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak unit tests.Daniel Dunbar2009-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79879 91177308-0d34-0410-b5e6-96231b3b80d8