summaryrefslogtreecommitdiff
path: root/lib/Support
Commit message (Collapse)AuthorAge
...
* adding re-include guards into lib/Support/reg*.hArtyom Skrobov2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210794 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210783 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't import make_error_code into the llvm namespace.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210772 91177308-0d34-0410-b5e6-96231b3b80d8
* Prefix generic_category with std::.Rafael Espindola2014-06-12
| | | | | | Sorry I missed these before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210740 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't put generic_category in the llvm namespace.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210737 91177308-0d34-0410-b5e6-96231b3b80d8
* Used mapWindowsError. I missed these in the initial transition.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210729 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix the mingw build.Rafael Espindola2014-06-12
| | | | | | | * MingW needs mapWindowsError. * MingW is missing some entries in std::errc, but we don't use them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210725 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement get_magic with generic tools and inline it.Rafael Espindola2014-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210716 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused has_magic.Rafael Espindola2014-06-11
| | | | | | | This will allow inlining get_magic, which should in turn fix one of the mingw build problems after the switch to std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210712 91177308-0d34-0410-b5e6-96231b3b80d8
* Use std::error_code instead of llvm::error_code.Rafael Espindola2014-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of this patch is to turn llvm/Support/system_error.h into a transitional header that just brings in the erorr_code api to the llvm namespace. I will remove it shortly afterwards. The cases where the general idea needed some tweaking: * std::errc is a namespace in msvc, so we cannot use "using std::errc". I could add an #ifdef, but there were not that many uses, so I just added std:: to them in this patch. * Template specialization had to be moved to the std namespace in this patch set already. * The msvc implementation of default_error_condition doesn't seem to provide the same transformations as we need. Not too surprising since the standard doesn't actually say what "equivalent" means. I fixed the problem by keeping our old mapping and using it at error_code construction time. Despite these shortcomings I think this is still a good thing. Some reasons: * The different implementations of system_error might improve over time. * It removes 925 lines of code from llvm already. * It removes 6313 bytes from the text segment of the clang binary when it is built with gcc and 2816 bytes when building with clang and libstdc++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210687 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert StringMapEntry::Create to use StringRef instead of start/end ↵Craig Topper2014-06-11
| | | | | | pointers. Simpliies all in tree call sites. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210638 91177308-0d34-0410-b5e6-96231b3b80d8
* Uses generic_category instead of system_category.Rafael Espindola2014-06-11
| | | | | | | Some c++ libraries (libstdc++ at least) don't seem to map to the generic category in in the system_category's default_error_condition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210635 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove windows_error.Rafael Espindola2014-06-11
| | | | | | | | | | MSVC doesn't seem to provide any is_error_code_enum enumeration for the windows errors. Fortunately very few places in llvm have to handle raw windows errors, so we can just construct the corresponding error_code directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210631 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no posix_category in std, use generic_category.Rafael Espindola2014-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210630 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Remove support for runtime multi-threading."Zachary Turner2014-06-10
| | | | | | This reverts revision r210600. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210603 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for runtime multi-threading.Zachary Turner2014-06-10
| | | | | | | | | | | | | | | | | | | | | This patch removes the functions llvm_start_multithreaded() and llvm_stop_multithreaded(), and changes llvm_is_multithreaded() to return a constant value based on the value of the compile-time definition LLVM_ENABLE_THREADS. Previously, it was possible to have compile-time support for threads on, and runtime support for threads off, in which case certain mutexes were not allocated or ever acquired. Now, if the build is created with threads enabled, mutexes are always acquired. A test before/after patch of compiling a very large TU showed no noticeable performance impact of this change. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4076 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210600 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark a few functions noexcept.Rafael Espindola2014-06-10
| | | | | | This reduces the difference between std::error_code and llvm::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210591 91177308-0d34-0410-b5e6-96231b3b80d8
* Test commit, wraps some lines to fit in 80 columns.Zachary Turner2014-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210551 91177308-0d34-0410-b5e6-96231b3b80d8
* APFloat: x - NaN needs to flip the signbit of NaN when x is a number.Stephen Canon2014-06-08
| | | | | | Because we don't have a separate negate( ) function, 0 - NaN does double-duty as the IEEE-754 negate( ) operation, which (unlike most FP ops) *does* attach semantic meaning to the signbit of NaN. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210428 91177308-0d34-0410-b5e6-96231b3b80d8
* GraphWriter: try gv before xdg-openAlp Toker2014-06-04
| | | | | | | | | Avoid changing behaviour for everyone who's used to the traditional ghostview UI, especially since it knows how to stay in the foreground unlike xdg-open. Amendment to r210147. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210148 91177308-0d34-0410-b5e6-96231b3b80d8
* GraphWriter: support the XDG open utilityAlp Toker2014-06-04
| | | | | | | This runs a suitable viewer on Unix desktop environments specified by Freedesktop.org (GNOME, KDE, Linux distributions etc.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210147 91177308-0d34-0410-b5e6-96231b3b80d8
* Process::GetRandomNumber(): fix insecure RNGAlp Toker2014-06-03
| | | | | | | This could have generated non-random output under error conditions in release builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210065 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence -Wreturn-type warningAlp Toker2014-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210005 91177308-0d34-0410-b5e6-96231b3b80d8
* GraphWriter: tweak the program fallback orderAlp Toker2014-06-02
| | | | | | | Amend r210001 to use the classic fallback order behaviour if the requested graphing program isn't found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210003 91177308-0d34-0410-b5e6-96231b3b80d8
* GraphWriter: detect graph viewer programs at runtimeAlp Toker2014-06-02
| | | | | | | | | | | | | | | | | | | | | | Replace the crufty build-time configure checks for program paths with equivalent runtime logic. This lets users install graphing tools as needed without having to reconfigure and rebuild LLVM, while eliminating a long chain of inappropriate compile dependencies that included GUI programs and the windowing system. Additional features: * Support the OS X 'open' command to view graphs generated by any of the Graphviz utilities. This is an alternative to the Graphviz OS X UI which is no longer available on Mountain Lion. * Produce informative log output upon failure to indicate which programs can be installed to view graphs. Ping me if this doesn't work for your particular environment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210001 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: add Windows ARM EH data structuresSaleem Abdulrasool2014-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the support structures necessary to deal with the Windows ARM EH data. These definitions are extremely aggressive about assertions to aid future use for generation of the entries and subsequent decoding. The names for the various fields are meant to reflect the names used by the Visual Studio toolchain to aid communication. Due to the complexity in reading a few of the values, there are a couple of additional utility functions to decode the information. In general, there are two ways to encode the unwinding information: - packed, which places the data inline into the _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY structure. - unpacked, which places the data into auxiliary structures placed into the .xdata section. The set of structures allow reading of data in either encoding, with the minor caveat that epilogue scopes need to be decoded manually by constructing the structure from the data returned by the RuntimeFunction structure. These definitions are meant for read-only access at the current point as the first use of them will be to decode the exception information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209998 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typosAlp Toker2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209982 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Add new command line option `-docnum`.Simon Atanasyan2014-05-31
| | | | | | | | | | Input YAML file might contain multiple object file definitions. New option `-docnum` allows to specify an ordinal number (starting from 1) of definition used for an object file generation. Patch reviewed by Sean Silva. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209967 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix windows build.Rafael Espindola2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209961 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no std::errc::success, remove the llvm one.Rafael Espindola2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209960 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn errc and windows_error into enum classes.Rafael Espindola2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209957 91177308-0d34-0410-b5e6-96231b3b80d8
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-31
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209952 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the behavior of ExecuteAndWait with a non-zero timeout.Peter Collingbourne2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209951 91177308-0d34-0410-b5e6-96231b3b80d8
* delete dead code.Rafael Espindola2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209938 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup sys::getHostCPUFeatures crypto names so it doesn't clash with kernel ↵Bradley Smith2014-05-23
| | | | | | headers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209506 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend sys::getHostCPUFeatures to work on AArch64 platformsBradley Smith2014-05-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209420 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up language and grammar.Eric Christopher2014-05-20
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209216 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuffer: Use GetNativeSystemInfo()Alp Toker2014-05-19
| | | | | | | Removes old 4096 byte workaround. This functionality has been available since Windows XP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209137 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove last uses of OwningPtr from llvm. As far as I can tell these method ↵Craig Topper2014-05-18
| | | | | | versions are not used by lldb, lld, or clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209103 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix hardcoded slash to native path seperator which was exposed from ↵Yaron Keren2014-05-16
| | | | | | | | | | llvm::sys::path. http://reviews.llvm.org/D3687 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208980 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuffer: don't force mmap when stat failsAlp Toker2014-05-09
| | | | | | | Fix error handling introduced in r127426 that could result in MemoryBuffers not having null termination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208396 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuffer: remove unusued definitionsAlp Toker2014-05-09
| | | | | | These were made redundant back in r186560. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208395 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support/MemoryBuffer] Remove the assertion that the file size did not shrink.Argyrios Kyrtzidis2014-05-06
| | | | | | | This can happen in practice with the user changing files and we can recover from it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208143 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-commit r208025, reverted in r208030, with a fix for a conformance issueRichard Smith2014-05-06
| | | | | | | which GCC detects and Clang does not! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208033 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r208025, which made buildbots unhappy for unknown reasons.Richard Smith2014-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208030 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support/MemoryBuffer] Rename IsVolatile -> IsVolatileSize and add a comment ↵Argyrios Kyrtzidis2014-05-06
| | | | | | about the use case for the new parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208026 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::function_ref (and a couple of uses of it), representing a ↵Richard Smith2014-05-06
| | | | | | type-erased reference to a callable object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208025 91177308-0d34-0410-b5e6-96231b3b80d8
* Include intrin.h before windows.h as a workaround for the x64 self-hostReid Kleckner2014-05-06
| | | | | | | | | On x64, windows.h doesn't include intrin.h for intrinsics. It just declares them in the global namespace and uses them, expecting the compiler to lower it as a builtin. We basically need to do this in clang, eventually. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208023 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support/MemoryBuffer] Move the IsVolatile check inside shouldUseMmap() and ↵Argyrios Kyrtzidis2014-05-06
| | | | | | | | | make sure to zero-initialize the rest of the buffer if we unexpectedly reach end-of-file while reading. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208021 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support/MemoryBuffer] Introduce a boolean parameter (false by default) ↵Argyrios Kyrtzidis2014-05-05
| | | | | | | | | 'IsVolatile' for the open file functions. This provides a hint that the file may be changing often so mmap is avoided. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208007 91177308-0d34-0410-b5e6-96231b3b80d8