summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
* Turns out gtest still prefers the system <tr1/tuple> over it's ownBenjamin Kramer2010-06-03
| | | | | | | implementation. Force the internal one to unbreak clang selfhost on linux. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105386 91177308-0d34-0410-b5e6-96231b3b80d8
* Update Readme and Makefiles for the new gtest.Benjamin Kramer2010-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105355 91177308-0d34-0410-b5e6-96231b3b80d8
* Add StringRef::compare_numeric and use it to sort TableGen register records.Jakob Stoklund Olesen2010-05-26
| | | | | | | This means that our Registers are now ordered R7, R8, R9, R10, R12, ... Not R1, R10, R11, R12, R2, R3, ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104745 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix const ilist_node::get{Prev,Next}Node() to actually compile. Picky, picky.Daniel Dunbar2010-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103723 91177308-0d34-0410-b5e6-96231b3b80d8
* ADT: Add ilist_node::get{Prev,Next}Node, which return the adjacent node or null.Daniel Dunbar2010-05-12
| | | | | | | | | | | | | | | | | | | | - This provides a convenient alternative to using something llvm::prior or manual iterator access, for example:: if (T *Prev = foo->getPrevNode()) ... instead of:: iterator it(foo); if (it != begin()) { --it; ... } - Chris, please review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103647 91177308-0d34-0410-b5e6-96231b3b80d8
* Update BitVectorTest.cpp to stay in sync with SmallBitVectorTest.cpp,Dan Gohman2010-04-30
| | | | | | | and fix a bug in BitVector's reference proxy class which this exposed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102768 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallBitVector: Rework find_first/find_next and tweak test to test them (at ↵Benjamin Kramer2010-04-30
| | | | | | least on 64 bit platforms). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102712 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a read/write operator[] for SmallBitVector with a proxy class.Benjamin Kramer2010-04-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102709 91177308-0d34-0410-b5e6-96231b3b80d8
* silence some unused-value warnings.Chris Lattner2010-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101689 91177308-0d34-0410-b5e6-96231b3b80d8
* introduce a new CallGraphSCC class, and pass it aroundChris Lattner2010-04-16
| | | | | | | | | to CallGraphSCCPass's instead of passing around a std::vector<CallGraphNode*>. No functionality change, but now we have a much tidier interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101558 91177308-0d34-0410-b5e6-96231b3b80d8
* Update unittest for allocator laziness.Benjamin Kramer2010-04-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101131 91177308-0d34-0410-b5e6-96231b3b80d8
* update unit test for api change.Chris Lattner2010-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100486 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix SmallVector's insert to handle non-random-access iterators.Dan Gohman2010-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99633 91177308-0d34-0410-b5e6-96231b3b80d8
* another oneGabor Greif2010-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98850 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this test more lenient; with SmallVector now using actuallyDan Gohman2010-03-18
| | | | | | | | aligned storage, the capacity may be more than what is explicitly requested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98846 91177308-0d34-0410-b5e6-96231b3b80d8
* feedback from NickGabor Greif2010-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98761 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix death tests in -Asserts builds.Jeffrey Yasskin2010-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98701 91177308-0d34-0410-b5e6-96231b3b80d8
* more BranchInst testsGabor Greif2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98634 91177308-0d34-0410-b5e6-96231b3b80d8
* add BranchInst testsGabor Greif2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98632 91177308-0d34-0410-b5e6-96231b3b80d8
* appease valgrind testersGabor Greif2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98628 91177308-0d34-0410-b5e6-96231b3b80d8
* add single return testsGabor Greif2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98625 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR6589Gabor Greif2010-03-16
| | | | | | | | | | | | | | adjusted unittest I have added some doxygen to OptionalOperandTraits, so hopefully there will be no confusion in the future. Incidentally OptionalOperandTraits is not used any more (IIUC), but the obvious client would be BranchInstr, and I plan to rearrange it that way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98624 91177308-0d34-0410-b5e6-96231b3b80d8
* begin humbly with a repro of PR6589Gabor Greif2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98623 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.Nick Lewycky2010-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98446 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the last memory leak from the VMCore unit tests.Jeffrey Yasskin2010-03-13
| | | | | | | Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98414 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a memory leak from MetadataTest.Jeffrey Yasskin2010-03-13
| | | | | | | Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98412 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a memory leak from VerifierTest.Jeffrey Yasskin2010-03-13
| | | | | | | Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98411 91177308-0d34-0410-b5e6-96231b3b80d8
* Consolidate GoogleTest make options and duplicate them to its own makefile.Chandler Carruth2010-03-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98074 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop leaking MDStrings.Jeffrey Yasskin2010-03-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97763 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR6360. It's easy for a stub's address to escape to user code, so we can'tJeffrey Yasskin2010-03-04
| | | | | | | | | | just count references to it from JIT output to decide when to destroy it. This patch waits to destroy the JIT's memory of a stub until the Function it refers to is destroyed. External function stubs and GVIndirectSyms aren't destroyed until the JIT itself is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97737 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5291, in which a SmallPtrSet iterator was held across an insertion intoJeffrey Yasskin2010-03-04
| | | | | | | the set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97720 91177308-0d34-0410-b5e6-96231b3b80d8
* Spelling fixes.Dan Gohman2010-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97454 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach APFloat how to create both QNaNs and SNaNs and with arbitrary-widthJohn McCall2010-02-28
| | | | | | | | | | payloads. APFloat's internal folding routines always make QNaNs now, instead of sometimes making QNaNs and sometimes SNaNs depending on the type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97364 91177308-0d34-0410-b5e6-96231b3b80d8
* Make APFloat's string-parsing routines a bit safer against very large exponents.John McCall2010-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97278 91177308-0d34-0410-b5e6-96231b3b80d8
* Try r96559 for the third time. This time the shared library is only built ifJeffrey Yasskin2010-02-25
| | | | | | | --enable-shared is passed to configure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97119 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll back r96959 again.Jeffrey Yasskin2010-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96981 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 ofJeffrey Yasskin2010-02-23
| | | | | | | the examples shared to make sure the shared library keeps working. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96959 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll back the shared library, r96559. It broke two darwins and arm, ↵Jeffrey Yasskin2010-02-18
| | | | | | mysteriously. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96569 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a shared library for LLVM, named libLLVM2.7svn.(so|dylib), and add anJeffrey Yasskin2010-02-18
| | | | | | | | | | | | | | | | | | | | | --enable-shared configure flag to have the tools linked shared. (2.7svn is just $(LLVMVersion) so it'll change to "2.7" in the release.) Always link the example programs shared to test that the shared library keeps working. On my mac laptop, Debug libLLVM2.7svn.dylib is 39MB, and opt (for example) is 16M static vs 440K shared. Two things are less than ideal here: 1) The library doesn't include any version information. Since we expect to break the ABI with every release, this shouldn't be much of a problem. If we do release a compatible 2.7.1, we may be able to hack its library to work with binaries compiled against 2.7.0, or we can just ask them to recompile. I'm hoping to get a real packaging expert to look at this for the 2.8 release. 2) llvm-config doesn't yet have an option to print link options for the shared library. I'll add this as a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96559 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Regex::sub, for doing regular expression substitution with backreferences.Daniel Dunbar2010-02-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96503 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the verifier to check the condition on a branch and ensure that it hasNick Lewycky2010-02-15
| | | | | | | 'i1' type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96282 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix (harmless) memory leak found by memcheck.Jeffrey Yasskin2010-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95862 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some of the memcheck errors found in the JIT unittests.Jeffrey Yasskin2010-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95856 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to create multiple JIT instances at the same time, by removingJeffrey Yasskin2010-02-11
| | | | | | | | | | | the global TheJIT and TheJITResolver variables. Lazy compilation is supported by a global map from a stub address to the JITResolver that knows how to compile it. Patch by Olivier Meurant! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95837 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence GCC warnings.Benjamin Kramer2010-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95779 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement operators |=, &=, and ^= for SmallBitVector, and remove theDan Gohman2010-02-10
| | | | | | | | restriction in BitVector for |= and ^= that the operand must be the same length. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95768 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable unittests/ADT/BitVectorTest on PPC Darwin.Dale Johannesen2010-02-09
| | | | | | | | | | | It fails with a release build only, for reasons as yet unknown. (If there's a better way to Xfail things here let me know, doesn't seem to be any prior art in unittests.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95700 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for TypeBuilder<const/volatile void*, false>.Jeffrey Yasskin2010-02-09
| | | | | | | | Thanks to Jochen Wilhelmy for the suggestion! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95677 91177308-0d34-0410-b5e6-96231b3b80d8
* Make APInt::countLeadingZerosSlowCase() treat the contents of padding bitsJohn McCall2010-02-03
| | | | | | | | as undefined. Fixes an assertion in APFloat::toString noticed by Dale. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95196 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-27
| | | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8