summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Move the two definitions of operator<< into namespace llvm, so theyDouglas Gregor2009-12-241-1/+4
| | | | | | | will be found by argument-dependent lookup. As with the previous commit, GCC is allowing ill-formed code. llvm-svn: 92146
* Define the new operator<< for sets into namespace std, so thatDouglas Gregor2009-12-241-0/+4
| | | | | | | | argument-dependent lookup can find it. This is another case where an LLVM bug (not making operator<< visible) was masked by a GCC bug (looking in the global namespace when it shouldn't). llvm-svn: 92144
* Add accessors for the largest-magnitude, smallest-magnitude, andJohn McCall2009-12-241-0/+20
| | | | | | | | smallest-normalized-magnitude values in a given FP semantics. Provide an APFloat-to-string conversion which I am quite ready to admit could be much more efficient. llvm-svn: 92126
* Disable JITTest.FunctionIsRecompiledAndRelinked on ARM where it's notJeffrey Yasskin2009-12-231-0/+4
| | | | | | implemented. llvm-svn: 91963
* Partially revert r91626. Materializing extra functions to determine whetherJeffrey Yasskin2009-12-222-7/+97
| | | | | | | | | | | they're available_externally broke VMKit, which was relying on the fact that functions would only be materialized when they were first called. We'll have to wait for http://llvm.org/PR5737 to really fix this. I also added a test for one of the F->isDeclaration() calls which wasn't covered by anything else in the test suite. llvm-svn: 91943
* Fix a crash in JIT::recompileAndRelinkFunction(). It doesn't pass the MCIJeffrey Yasskin2009-12-221-0/+31
| | | | | | | | | argument to runJITOnFunction(), which caused a null pointer dereference at every call. Patch by Gianluca Guida! llvm-svn: 91939
* Change StringRef::startswith and StringRef::endswith to versions which are aEli Friedman2009-12-211-0/+8
| | | | | | bit more verbose, but optimize to much shorter code. llvm-svn: 91817
* Catch more cases of a pointer being marked garbage twice. This helps whenRafael Espindola2009-12-181-0/+29
| | | | | | debugging some leaks (PR5770 in particular). llvm-svn: 91713
* Don't codegen available_externally functions. Fixes http://llvm.org/PR5735.Jeffrey Yasskin2009-12-171-0/+29
| | | | llvm-svn: 91626
* This fixes a memory leak in OpaqueType found by Google's internal heapchecker.Jeffrey Yasskin2009-12-171-0/+31
| | | | llvm-svn: 91611
* Reinstate r91208 to fix available_externally linkage for globals, withJeffrey Yasskin2009-12-132-0/+28
| | | | | | | nlewycky's fix to add -rdynamic so the JIT can look symbols up in Linux builds of the JITTests binary. llvm-svn: 91250
* Revert r91208. Something on Linux prevents the JIT from looking up a symbolJeffrey Yasskin2009-12-121-25/+0
| | | | | | defined in the test, and I don't have time tonight to figure it out. llvm-svn: 91209
* Fix available_externally linkage for globals. It's probably still notJeffrey Yasskin2009-12-121-0/+25
| | | | | | supported by emitGlobals, but I don't have a test case for that. llvm-svn: 91208
* Add an implementation of the delta debugging algorithm.Daniel Dunbar2009-12-031-0/+96
| | | | | | | - This is a pretty slow / memory intensive implementation, and I will likely change it to an iterative model, but it works. llvm-svn: 90447
* Oops. Re-disable JITTest.NoStubs on ARM and PPC since they still use stubs toJeffrey Yasskin2009-11-241-0/+5
| | | | | | make far calls work. llvm-svn: 89733
* * Move stub allocation inside the JITEmitter, instead of exposing aJeffrey Yasskin2009-11-231-3/+34
| | | | | | | | | | | | | | way for each TargetJITInfo subclass to allocate its own stubs. This means stubs aren't as exactly-sized anymore, but it lets us get rid of TargetJITInfo::emitFunctionStubAtAddr(), which lets ARM and PPC support the eager JIT, fixing http://llvm.org/PR4816. * Rename the JITEmitter's stub creation functions to describe the kind of stub they create. So far, all of them create lazy-compilation stubs, but they sometimes get used when far-call stubs are needed. Fixing http://llvm.org/PR5201 will involve fixing this. llvm-svn: 89715
* Only run this mutex test if threading is enabled. ThisDuncan Sands2009-11-191-0/+3
| | | | | | fixes PR5395. llvm-svn: 89385
* Reenable Split2 StringRef test with Apple gcc.Benjamin Kramer2009-11-191-6/+0
| | | | llvm-svn: 89357
OpenPOWER on IntegriCloud