summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
* another oneGabor Greif2010-03-181-1/+1
| | | | llvm-svn: 98850
* Make this test more lenient; with SmallVector now using actuallyDan Gohman2010-03-181-1/+1
| | | | | | | aligned storage, the capacity may be more than what is explicitly requested. llvm-svn: 98846
* feedback from NickGabor Greif2010-03-171-1/+2
| | | | llvm-svn: 98761
* Fix death tests in -Asserts builds.Jeffrey Yasskin2010-03-173-0/+6
| | | | llvm-svn: 98701
* more BranchInst testsGabor Greif2010-03-161-0/+15
| | | | llvm-svn: 98634
* add BranchInst testsGabor Greif2010-03-161-0/+71
| | | | llvm-svn: 98632
* appease valgrind testersGabor Greif2010-03-161-0/+4
| | | | llvm-svn: 98628
* add single return testsGabor Greif2010-03-161-0/+11
| | | | llvm-svn: 98625
* fix PR6589Gabor Greif2010-03-161-3/+3
| | | | | | | | | | | | | 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. llvm-svn: 98624
* begin humbly with a repro of PR6589Gabor Greif2010-03-161-0/+26
| | | | llvm-svn: 98623
* Teach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.Nick Lewycky2010-03-131-36/+89
| | | | llvm-svn: 98446
* Remove the last memory leak from the VMCore unit tests.Jeffrey Yasskin2010-03-131-2/+2
| | | | | Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests llvm-svn: 98414
* Remove a memory leak from MetadataTest.Jeffrey Yasskin2010-03-131-2/+2
| | | | | Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests llvm-svn: 98412
* Remove a memory leak from VerifierTest.Jeffrey Yasskin2010-03-131-3/+4
| | | | | Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests llvm-svn: 98411
* Consolidate GoogleTest make options and duplicate them to its own makefile.Chandler Carruth2010-03-091-8/+10
| | | | llvm-svn: 98074
* Stop leaking MDStrings.Jeffrey Yasskin2010-03-041-11/+18
| | | | llvm-svn: 97763
* Fix PR6360. It's easy for a stub's address to escape to user code, so we can'tJeffrey Yasskin2010-03-041-0/+23
| | | | | | | | | 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. llvm-svn: 97737
* Fix PR5291, in which a SmallPtrSet iterator was held across an insertion intoJeffrey Yasskin2010-03-041-0/+27
| | | | | | the set. llvm-svn: 97720
* Spelling fixes.Dan Gohman2010-03-011-1/+1
| | | | llvm-svn: 97454
* Teach APFloat how to create both QNaNs and SNaNs and with arbitrary-widthJohn McCall2010-02-281-0/+29
| | | | | | | | payloads. APFloat's internal folding routines always make QNaNs now, instead of sometimes making QNaNs and sometimes SNaNs depending on the type. llvm-svn: 97364
* Make APFloat's string-parsing routines a bit safer against very large exponents.John McCall2010-02-261-0/+7
| | | | llvm-svn: 97278
* Try r96559 for the third time. This time the shared library is only built ifJeffrey Yasskin2010-02-251-1/+10
| | | | | | --enable-shared is passed to configure. llvm-svn: 97119
* Roll back r96959 again.Jeffrey Yasskin2010-02-231-12/+1
| | | | llvm-svn: 96981
* Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 ofJeffrey Yasskin2010-02-231-1/+12
| | | | | | the examples shared to make sure the shared library keeps working. llvm-svn: 96959
* Roll back the shared library, r96559. It broke two darwins and arm, ↵Jeffrey Yasskin2010-02-181-5/+1
| | | | | | mysteriously. llvm-svn: 96569
* Add a shared library for LLVM, named libLLVM2.7svn.(so|dylib), and add anJeffrey Yasskin2010-02-181-1/+5
| | | | | | | | | | | | | | | | | | | | --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. llvm-svn: 96559
* Add Regex::sub, for doing regular expression substitution with backreferences.Daniel Dunbar2010-02-171-0/+29
| | | | llvm-svn: 96503
* Teach the verifier to check the condition on a branch and ensure that it hasNick Lewycky2010-02-151-0/+44
| | | | | | 'i1' type. llvm-svn: 96282
* Fix (harmless) memory leak found by memcheck.Jeffrey Yasskin2010-02-111-0/+1
| | | | llvm-svn: 95862
* Fix some of the memcheck errors found in the JIT unittests.Jeffrey Yasskin2010-02-111-4/+6
| | | | llvm-svn: 95856
* Make it possible to create multiple JIT instances at the same time, by removingJeffrey Yasskin2010-02-111-0/+164
| | | | | | | | | | 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! llvm-svn: 95837
* Silence GCC warnings.Benjamin Kramer2010-02-102-12/+12
| | | | llvm-svn: 95779
* Implement operators |=, &=, and ^= for SmallBitVector, and remove theDan Gohman2010-02-102-0/+79
| | | | | | | restriction in BitVector for |= and ^= that the operand must be the same length. llvm-svn: 95768
* Disable unittests/ADT/BitVectorTest on PPC Darwin.Dale Johannesen2010-02-092-0/+10
| | | | | | | | | 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.) llvm-svn: 95700
* Add support for TypeBuilder<const/volatile void*, false>.Jeffrey Yasskin2010-02-091-1/+8
| | | | | | Thanks to Jochen Wilhelmy for the suggestion! llvm-svn: 95677
* Make APInt::countLeadingZerosSlowCase() treat the contents of padding bitsJohn McCall2010-02-031-0/+2
| | | | | | as undefined. Fixes an assertion in APFloat::toString noticed by Dale. llvm-svn: 95196
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-272-23/+52
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 94686
* Roll r94484 (avoiding RTTI problems in tests) forward again in a way that isn'tJeffrey Yasskin2010-01-264-22/+5
| | | | | | broken by setting CXXFLAGS on the command line. llvm-svn: 94619
* Revert 94484. Re-disable unittests that need RTTI.Bob Wilson2010-01-264-5/+22
| | | | llvm-svn: 94569
* Re-enable unit tests disabled in r94164 by telling GTest about theJeffrey Yasskin2010-01-264-22/+5
| | | | | | lack of RTTI. llvm-svn: 94484
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-241-0/+2
| | | | llvm-svn: 94378
* 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
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-223-0/+23
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* NamedMDNode is a collection MDNodes.Devang Patel2010-01-051-1/+1
| | | | llvm-svn: 92761
* Add a SmallBitVector class, which mimics BitVector but uses onlyDan Gohman2010-01-052-0/+280
| | | | | | | | | | | | a single pointer (PointerIntPair) member. In "small" mode, the pointer field is reinterpreted as a set of bits. In "large" mode, the pointer points to a heap-allocated object. Also, give BitVector empty and swap functions. And, add some simple unittests for BitVector and SmallBitVector. llvm-svn: 92730
* Silence compiler warning.Benjamin Kramer2009-12-311-1/+1
| | | | | warning: comparison between signed and unsigned integer expressions llvm-svn: 92359
* Document the edit-distance algorithm used in StringRef, switch it overDouglas Gregor2009-12-311-0/+5
| | | | | | to SmallVector, and add a unit test. llvm-svn: 92340
* don't unittest mdnode printing, we have disassembler tests for this.Chris Lattner2009-12-311-18/+1
| | | | llvm-svn: 92328
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-311-6/+6
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* Implement support for converting to string at "natural precision", and fix someJohn McCall2009-12-241-1/+3
| | | | | | major bugs in long-precision conversion. llvm-svn: 92150
OpenPOWER on IntegriCloud