summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
* Adds llvm::sys::path::is_separator() to test whether a char is a path separatorZhanyong Wan2011-02-11
| | | | | | | on the host OS. Reviewed by dgregor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125406 91177308-0d34-0410-b5e6-96231b3b80d8
* build: Add MAKEFILE_UNITTEST_NO_INCLUDE_COMMON build variable, to be leveragedDaniel Dunbar2011-02-04
| | | | | | by Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124871 91177308-0d34-0410-b5e6-96231b3b80d8
* Part of this test is invariant inside the inner loop - move it outsideDuncan Sands2011-02-03
| | | | | | | the loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124784 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove NoVendor and NoOS, added in commit 123990, from Triple. While itDuncan Sands2011-02-02
| | | | | | | | | | may be useful to understand "none", this is not the place for it. Tweak the fix to Normalize while there: the fix added in 123990 works correctly, but I like this way better. Finally, now that Triple understands some non-trivial environment values, teach the unittests about them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124720 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't infinitely recurse! Patch by Marius Wachtler!Chris Lattner2011-01-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124366 91177308-0d34-0410-b5e6-96231b3b80d8
* Clang was not parsing target triples involving EABI and was generating wrong ↵Renato Golin2011-01-21
| | | | | | IR (wrong PCS) and passing the wrong information down llc via the target-triple printed in IR. I've fixed this by adding the parsing of EABI into LLVM's Triple class and using it to choose the correct PCS in Clang's Tools. A Clang patch is on its way to use this infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123990 91177308-0d34-0410-b5e6-96231b3b80d8
* Unittests/Support/Path: Tweak test.Michael J. Spencer2011-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123546 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow unnamed_addr on declarations.Rafael Espindola2011-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123529 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable RTTI when building unit tests. This avoids errors at link time.Oscar Fuentes2011-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123377 91177308-0d34-0410-b5e6-96231b3b80d8
* Reject uses of unnamed_addr in declarations.Rafael Espindola2011-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123358 91177308-0d34-0410-b5e6-96231b3b80d8
* First step in fixing PR8927:Rafael Espindola2011-01-08
| | | | | | | | | | | | | | | | | | | Add a unnamed_addr bit to global variables and functions. This will be used to indicate that the address is not significant and therefore the constant or function can be merged with others. If an optimization pass can show that an address is not used, it can set this. Examples of things that can have this set by the FE are globals created to hold string literals and C++ constructors. Adding unnamed_addr to a non-const global should have no effect unless an optimization can transform that global into a constant. Aliases are not allowed to have unnamed_addr since I couldn't figure out any use for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123063 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the "ugly" method BranchInst::setUnconditionalDest().Jay Foad2011-01-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123026 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/Path: Add magical tests. This will also test identify_magic.Michael J. Spencer2011-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122948 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/Path: More ASSERT_NO_ERROR cleanup.Michael J. Spencer2011-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122947 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/Path: Fix typo, add error number, and enable the directory cleanup ↵Michael J. Spencer2011-01-05
| | | | | | code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122885 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/PathV2: Setup a test fixture to make tracking created file systemMichael J. Spencer2011-01-05
| | | | | | entities easier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122880 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Implement directory iteration on POSIX.Michael J. Spencer2011-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122879 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/Path: Produce useful diagnostics on error.Michael J. Spencer2011-01-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122812 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR8867: a crash handling fp128. Thanks to Nick for the testcase.Chris Lattner2010-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122613 91177308-0d34-0410-b5e6-96231b3b80d8
* Change all self assignments X=X to (void)X, so that we can turn on aJeffrey Yasskin2010-12-23
| | | | | | | | | new gcc warning that complains on self-assignments and self-initializations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122458 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ADT/IntEqClasses.h as a light-weight implementation of EquivalenceClasses.h.Jakob Stoklund Olesen2010-12-21
| | | | | | | | | | This implementation already exists as ConnectedVNInfoEqClasses in LiveInterval.cpp, and it seems to be generally useful to have a light-weight way of forming equivalence classes of small integers. IntEqClasses doesn't allow enumeration of the elements in a class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122293 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more checks to IntervalMapOverlaps::advance() to ensure that advanceTo seesJakob Stoklund Olesen2010-12-17
| | | | | | monotonic keys. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122093 91177308-0d34-0410-b5e6-96231b3b80d8
* It is allowed to call IntervalMap::const_iterator::advanceTo() with a key thatJakob Stoklund Olesen2010-12-17
| | | | | | | | moves the iterator to end(), and it is valid to call it on end(). That means it is valid to call advanceTo() with any monotonic key sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122092 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix crash when IntervalMapOverlaps::advanceTo moves past the last overlap.Jakob Stoklund Olesen2010-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122081 91177308-0d34-0410-b5e6-96231b3b80d8
* Complete tests for IntervalMapOverlaps.Jakob Stoklund Olesen2010-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122019 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic test exposing many bugs.Jakob Stoklund Olesen2010-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121995 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Change most functions in the path namespace to return their workMichael J. Spencer2010-12-07
| | | | | | via their return value instead of an out parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121149 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Fix warning in gtest header used by unit tests.Frits van Bommel2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121127 91177308-0d34-0410-b5e6-96231b3b80d8
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-07
| | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121120 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/CMakeLists.txt: Tweak unittests' layout to be identical to GNU build.NAKAMURA Takumi2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121117 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Remove the error_code return type from all functions in the pathMichael J. Spencer2010-12-07
| | | | | | | namespace. None of them return anything except for success anyway. These will be converted to returning their result soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121109 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Move make_absolute from path to fs.Michael J. Spencer2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121108 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add directory_iterator implementation.Michael J. Spencer2010-12-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120989 91177308-0d34-0410-b5e6-96231b3b80d8
* Unittests/Support/PathV2: Add FileSystem tests.Michael J. Spencer2010-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120888 91177308-0d34-0410-b5e6-96231b3b80d8
* Add IntervalMap::iterator::set{Start,Stop,Value} methods that allow limitedJakob Stoklund Olesen2010-12-03
| | | | | | | | | | | editing of the current interval. These methods may cause coalescing, there are corresponding set*Unchecked methods for editing without coalescing. The non-coalescing methods are useful for applying monotonic transforms to all keys or values in a map without accidentally coalescing transformed and untransformed intervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120829 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add remove implementation.Michael J. Spencer2010-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120817 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/PathV2: remove(3) requires a terminated string.Benjamin Kramer2010-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120803 91177308-0d34-0410-b5e6-96231b3b80d8
* Unittests/Support/PathV2: Cleanup and remove output.Michael J. Spencer2010-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120785 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/PathV2: Comment out test because some systems are saying thatMichael J. Spencer2010-12-03
| | | | | | a file exists when it shouldn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120784 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add unique_file and exists implementations.Michael J. Spencer2010-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120776 91177308-0d34-0410-b5e6-96231b3b80d8
* Make valgrind happy.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120616 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/ADT/Twine: Add toNullTerminatedStringRef.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120600 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/PathV2: Fix -pedantic warning.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120590 91177308-0d34-0410-b5e6-96231b3b80d8
* PR5207: Rename overloaded APInt methods set(), clear(), flip() toJay Foad2010-12-01
| | | | | | setAllBits(), setBit(unsigned), etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120564 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add is_{absolute,relative} implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120560 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add ↵Michael J. Spencer2010-12-01
| | | | | | has_{root_path,root_name,root_directory,parent_path,filename,stem,extension} implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120559 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/PathV2: Make tests much shorter; although harder to ↵Michael J. Spencer2010-12-01
| | | | | | | | | understand. I'm going to replace this all anyway with a proper table and separated tests when done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120558 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add extension implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120550 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add stem implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120547 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add filename implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120546 91177308-0d34-0410-b5e6-96231b3b80d8