summaryrefslogtreecommitdiff
path: root/unittests/Support
Commit message (Collapse)AuthorAge
* Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184431 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified the implementation of fs::GetUniqueID on Windows such that it ↵Aaron Ballman2013-06-19
| | | | | | actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184351 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid using PathV1.h in Program.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the program class.Rafael Espindola2013-06-12
| | | | | | | It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183864 91177308-0d34-0410-b5e6-96231b3b80d8
* Move PathV2.h to Path.hRafael Espindola2013-06-11
| | | | | | | Most clients have already been moved from Path V1 to V2. The ones using V1 now include PathV1.h explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183801 91177308-0d34-0410-b5e6-96231b3b80d8
* sys::process::get_id() now returns the process ID instead of a process ↵Aaron Ballman2013-06-08
| | | | | | handle on Windows. Patch thanks to Kim Gräsman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183621 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for adding the contents of a StringRef to the MD5 hash.Eric Christopher2013-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183054 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more unsigned char -> uint8_t.Eric Christopher2013-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183053 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment and some tests including the NULL byte.Eric Christopher2013-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182900 91177308-0d34-0410-b5e6-96231b3b80d8
* Add to testsuite.Eric Christopher2013-05-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182693 91177308-0d34-0410-b5e6-96231b3b80d8
* ArrayRef-ize MD5 and clean up a few variable names.Eric Christopher2013-05-24
| | | | | | | Add a stringize method to make dumping a bit easier, and add a testcase exercising a few different paths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182692 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Remove Count{Leading,Trailing}Zeros_{32,64}.Michael J. Spencer2013-05-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182690 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][MathExtras] Fix literal type issues.Michael J. Spencer2013-05-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182679 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Add type generic bit utilities to MathExtras.hMichael J. Spencer2013-05-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182667 91177308-0d34-0410-b5e6-96231b3b80d8
* Get the unittests compiling when building with cmake and the settingDuncan Sands2013-05-14
| | | | | | | -DLLVM_ENABLE_THREADS=false. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181788 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented public interface for modifying registered (not positional or ↵Andrew Trick2013-05-06
| | | | | | | | sink options) command line options at runtime. Patch by Dan Liew! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181254 91177308-0d34-0410-b5e6-96231b3b80d8
* Support command line option categories.Andrew Trick2013-05-06
| | | | | | Patch by Dan Liew! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181253 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix ProgramTest on FreeBSDReid Kleckner2013-04-30
| | | | | | | This seemed like the cleanest way to find the test executable. Also fix the file mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180770 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't forward declare environ on WindowsReid Kleckner2013-04-24
| | | | | | | | | That seems to interact poorly with the environ and _environ macros defined in MSVC's <stdlib.h>. Also remove the incorrect comment about _NSGetEnviron(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180200 91177308-0d34-0410-b5e6-96231b3b80d8
* Un-revert the environ copy in ProgramTest after fixing it on OS XReid Kleckner2013-04-23
| | | | | | | | | | This was r180041 and r180046, which was reverted in r180066. Re-committing this should fix the dragonegg bootstrap, which I presume needs LD_LIBRARY_PATH to be propagated to the child. Tested on Linux, Windows, and Mac OS 10.6. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180099 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more guards around zlib-dependent codeAlexey Samsonov2013-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180084 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic zlib support to LLVM. This would allow to use ↵Alexey Samsonov2013-04-23
| | | | | | compression/uncompression in selected LLVM tools. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180083 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add a missing reference on a std::vector<> out param"Michael Gottesman2013-04-22
| | | | | | | | | | | | | Revert "[Support] Propagate the environment into the test child process" This reverts commit r180046. This reverts commit r180041. These have broken buildbots for ~3 hours: http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/763 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180066 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a missing reference on a std::vector<> out paramReid Kleckner2013-04-22
| | | | | | | Pointed out by Eli. The test passes for me either way, so I missed this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180046 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Propagate the environment into the test child processReid Kleckner2013-04-22
| | | | | | | Should fix the dragonegg bootstrap builder, which reasonably needs LD_LIBRARY_PATH to be set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180041 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Fix argv string escape bug on WindowsReid Kleckner2013-04-22
| | | | | | | | | | | | | | | | Summary: This is http://llvm.org/PR15802. Backslashes preceding double quotes in arguments must be escaped. The interesting bit is that all other backslashes should *not* be escaped, because the un-escaping logic is only triggered by the presence of a double quote character. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D705 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180035 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][FileSystem] Fix identify_magic for big endian ELF.Michael J. Spencer2013-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178905 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable Initialize.MultipleThreads test under MemorySanitizer.Evgeniy Stepanov2013-03-27
| | | | | | | Fails due to insufficient thread stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178135 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for graceful handling of long file names on Windows. Patch thanks ↵Aaron Ballman2013-03-16
| | | | | | to Paul Robinson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177223 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][Test] Missed this in the API change.Michael J. Spencer2013-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176996 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add support for implicit conversion from error ↵Michael J. Spencer2013-02-28
| | | | | | code/condition enums. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176228 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add support for convertable types.Michael J. Spencer2013-02-06
| | | | | | Thanks to Andrew, David, and Aaron for helping fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174552 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[Support][ErrorOr] Add support for convertable types."Andrew Trick2013-02-05
| | | | | | | | | This reverts commit a33e1fafac7fedb1b080ef07ddf9ad6ddff3a830. This unit test crashes on Darwon. It needs to be temporarily reverted to unblock the test infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174458 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add support for convertable types.Michael J. Spencer2013-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174357 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/SupportTests/Initialize.MultipleThreads: Enable ↵NAKAMURA Takumi2013-01-24
| | | | | | | | | pthread_attr_setstack(3) only on Linux. I got blamed on darwin11; unittests/Support/ManagedStatic.cpp:35: error: 'pthread_attr_setstack' was not declared in this scope git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173355 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/SupportTests/Initialize.MultipleThreads: Appease --vg-leak to ↵NAKAMURA Takumi2013-01-24
| | | | | | allocate stack explicitly for glibc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173350 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add optimized specialization of ErrorOr<void>.Michael J. Spencer2013-01-23
| | | | | | | | ErrorOr<void> represents an operation that returns nothing, but can still fail. It should be used in cases where you need the aditional user data that ErrorOr provides over error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173209 91177308-0d34-0410-b5e6-96231b3b80d8
* ErrorOrTest.cpp: Check existence of EXPECT_DEBUG_DEATH. It is not always ↵NAKAMURA Takumi2013-01-22
| | | | | | available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173123 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Make test C++03.Michael J. Spencer2013-01-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173004 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable test that fails due to lack of std::true_type in C++03.Benjamin Kramer2013-01-20
| | | | | | Michael, can this test be ported to C++03? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172996 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Port ErrorOr<T> from lld to C++03.Michael J. Spencer2013-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172991 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace memcpys by a static_cast and an integral promotion.Dmitri Gribenko2013-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172108 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix coding styleDmitri Gribenko2013-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172107 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak tests after regression from r172081.Jakub Staszak2013-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172105 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Alias BugDavid Greene2013-01-10
| | | | | | | Use memcpy to do type punning instead of a cast. A cast or similar operation through a union breaks strict aliasing rules. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172081 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the unittest from ArrayRecylerTest.cpp to ArrayRecyclerTest.cpp.Chandler Carruth2013-01-05
| | | | | | | Fixes the CMake build. It took me cutting and pasting this before I managed to see the missing character. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171589 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an ArrayRecycler class.Jakob Stoklund Olesen2013-01-05
| | | | | | | | This is similar to the existing Recycler allocator, but instead of recycling individual objects from a BumpPtrAllocator, arrays of different sizes can be allocated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171581 91177308-0d34-0410-b5e6-96231b3b80d8
* Add time getters to the process interface for requesting the elapsedChandler Carruth2013-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wall time, user time, and system time since a process started. For walltime, we currently use TimeValue's interface and a global initializer to compute a close approximation of total process runtime. For user time, this adds support for an somewhat more precise timing mechanism -- clock_gettime with the CLOCK_PROCESS_CPUTIME_ID clock selected. For system time, we have to do a full getrusage call to extract the system time from the OS. This is expensive but unavoidable. In passing, clean up the implementation of the old APIs and fix some latent bugs in the Windows code. This might have manifested on Windows ARM systems or other systems with strange 64-bit integer behavior. The old API for this both user time and system time simultaneously from a single getrusage call. While this results in fewer system calls, it also results in a lower precision user time and if only user time is desired, it introduces a higher overhead. It may be worthwhile to switch some of the pass timers to not track system time and directly track user and wall time. The old API also tracked walltime in a confusing way -- it just set it to the current walltime rather than providing any measure of wall time since the process started the way buth user and system time are tracked. The new API is more consistent here. The plan is to eventually implement these methods for a *child* process by using the wait3(2) system call to populate an rusage struct representing the whole subprocess execution. That way, after waiting on a child process its stats will become accurate and cheap to query. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171551 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix how YAML I/O detects flow sequences. Nick Kledzik2013-01-04
| | | | | | | | Update test case to verify flow sequence is written as a flow sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171514 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][Endian] Add support for specifying the alignment and native ↵Michael J. Spencer2013-01-02
| | | | | | | | | | | unaligned types. * Add support for specifying the alignment to use. * Add the concept of native endianness. Used for unaligned native types. The native alignment and read/write simplification is based on a patch by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171406 91177308-0d34-0410-b5e6-96231b3b80d8