summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* Try to fix the windows build.Rafael Espindola2014-06-121-1/+1
| | | | llvm-svn: 210837
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-1215-4/+16
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* Trying to fix the windows build.Rafael Espindola2014-06-121-4/+3
| | | | llvm-svn: 210805
* Remove system_error.h.Rafael Espindola2014-06-129-9/+9
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. llvm-svn: 210803
* adding re-include guards into lib/Support/reg*.hArtyom Skrobov2014-06-124-0/+20
| | | | llvm-svn: 210794
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-4/+4
| | | | llvm-svn: 210783
* Don't import make_error_code into the llvm namespace.Rafael Espindola2014-06-125-10/+10
| | | | llvm-svn: 210772
* Prefix generic_category with std::.Rafael Espindola2014-06-121-2/+2
| | | | | | Sorry I missed these before. llvm-svn: 210740
* Don't put generic_category in the llvm namespace.Rafael Espindola2014-06-125-30/+30
| | | | llvm-svn: 210737
* Used mapWindowsError. I missed these in the initial transition.Rafael Espindola2014-06-121-3/+4
| | | | llvm-svn: 210729
* Try to fix the mingw build.Rafael Espindola2014-06-121-30/+6
| | | | | | | * MingW needs mapWindowsError. * MingW is missing some entries in std::errc, but we don't use them. llvm-svn: 210725
* Implement get_magic with generic tools and inline it.Rafael Espindola2014-06-113-79/+10
| | | | llvm-svn: 210716
* Remove unused has_magic.Rafael Espindola2014-06-111-18/+0
| | | | | | | This will allow inlining get_magic, which should in turn fix one of the mingw build problems after the switch to std::error_code. llvm-svn: 210712
* Use std::error_code instead of llvm::error_code.Rafael Espindola2014-06-1113-326/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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++. llvm-svn: 210687
* Convert StringMapEntry::Create to use StringRef instead of start/end ↵Craig Topper2014-06-111-1/+1
| | | | | | pointers. Simpliies all in tree call sites. No functional change. llvm-svn: 210638
* Uses generic_category instead of system_category.Rafael Espindola2014-06-112-25/+25
| | | | | | | Some c++ libraries (libstdc++ at least) don't seem to map to the generic category in in the system_category's default_error_condition. llvm-svn: 210635
* Remove windows_error.Rafael Espindola2014-06-112-30/+40
| | | | | | | | | | 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. llvm-svn: 210631
* There is no posix_category in std, use generic_category.Rafael Espindola2014-06-112-12/+3
| | | | llvm-svn: 210630
* Revert "Remove support for runtime multi-threading."Zachary Turner2014-06-104-14/+44
| | | | | | This reverts revision r210600. llvm-svn: 210603
* Remove support for runtime multi-threading.Zachary Turner2014-06-104-44/+14
| | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 210600
* Mark a few functions noexcept.Rafael Espindola2014-06-101-2/+2
| | | | | | This reduces the difference between std::error_code and llvm::error_code. llvm-svn: 210591
* Test commit, wraps some lines to fit in 80 columns.Zachary Turner2014-06-101-2/+4
| | | | llvm-svn: 210551
* APFloat: x - NaN needs to flip the signbit of NaN when x is a number.Stephen Canon2014-06-081-1/+3
| | | | | | 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. llvm-svn: 210428
* GraphWriter: try gv before xdg-openAlp Toker2014-06-041-2/+2
| | | | | | | | | 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. llvm-svn: 210148
* GraphWriter: support the XDG open utilityAlp Toker2014-06-041-2/+8
| | | | | | | This runs a suitable viewer on Unix desktop environments specified by Freedesktop.org (GNOME, KDE, Linux distributions etc.) llvm-svn: 210147
* Process::GetRandomNumber(): fix insecure RNGAlp Toker2014-06-031-2/+3
| | | | | | | This could have generated non-random output under error conditions in release builds. llvm-svn: 210065
* Silence -Wreturn-type warningAlp Toker2014-06-021-0/+1
| | | | llvm-svn: 210005
* GraphWriter: tweak the program fallback orderAlp Toker2014-06-021-1/+1
| | | | | | | Amend r210001 to use the classic fallback order behaviour if the requested graphing program isn't found. llvm-svn: 210003
* GraphWriter: detect graph viewer programs at runtimeAlp Toker2014-06-021-119/+129
| | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 210001
* Support: add Windows ARM EH data structuresSaleem Abdulrasool2014-06-022-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 209998
* Fix typosAlp Toker2014-05-311-1/+1
| | | | llvm-svn: 209982
* [yaml2obj] Add new command line option `-docnum`.Simon Atanasyan2014-05-311-2/+2
| | | | | | | | | | 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. llvm-svn: 209967
* Fix windows build.Rafael Espindola2014-05-312-3/+2
| | | | llvm-svn: 209961
* There is no std::errc::success, remove the llvm one.Rafael Espindola2014-05-312-3/+3
| | | | llvm-svn: 209960
* Turn errc and windows_error into enum classes.Rafael Espindola2014-05-312-7/+7
| | | | llvm-svn: 209957
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-3110-78/+78
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209952
* Fix the behavior of ExecuteAndWait with a non-zero timeout.Peter Collingbourne2014-05-311-1/+2
| | | | llvm-svn: 209951
* delete dead code.Rafael Espindola2014-05-312-40/+0
| | | | llvm-svn: 209938
* Fixup sys::getHostCPUFeatures crypto names so it doesn't clash with kernel ↵Bradley Smith2014-05-231-9/+9
| | | | | | headers llvm-svn: 209506
* Extend sys::getHostCPUFeatures to work on AArch64 platformsBradley Smith2014-05-221-1/+37
| | | | llvm-svn: 209420
* Clean up language and grammar.Eric Christopher2014-05-202-2/+2
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 llvm-svn: 209216
* MemoryBuffer: Use GetNativeSystemInfo()Alp Toker2014-05-192-17/+6
| | | | | | | Removes old 4096 byte workaround. This functionality has been available since Windows XP. llvm-svn: 209137
* Remove last uses of OwningPtr from llvm. As far as I can tell these method ↵Craig Topper2014-05-182-63/+0
| | | | | | versions are not used by lldb, lld, or clang. llvm-svn: 209103
* Fix hardcoded slash to native path seperator which was exposed from ↵Yaron Keren2014-05-162-1/+8
| | | | | | | | llvm::sys::path. http://reviews.llvm.org/D3687 llvm-svn: 208980
* MemoryBuffer: don't force mmap when stat failsAlp Toker2014-05-091-3/+2
| | | | | | | Fix error handling introduced in r127426 that could result in MemoryBuffers not having null termination. llvm-svn: 208396
* MemoryBuffer: remove unusued definitionsAlp Toker2014-05-091-8/+0
| | | | | | These were made redundant back in r186560. llvm-svn: 208395
* [Support/MemoryBuffer] Remove the assertion that the file size did not shrink.Argyrios Kyrtzidis2014-05-061-3/+0
| | | | | | This can happen in practice with the user changing files and we can recover from it. llvm-svn: 208143
* Re-commit r208025, reverted in r208030, with a fix for a conformance issueRichard Smith2014-05-061-7/+6
| | | | | | which GCC detects and Clang does not! llvm-svn: 208033
* Revert r208025, which made buildbots unhappy for unknown reasons.Richard Smith2014-05-061-6/+7
| | | | llvm-svn: 208030
* [Support/MemoryBuffer] Rename IsVolatile -> IsVolatileSize and add a comment ↵Argyrios Kyrtzidis2014-05-061-22/+23
| | | | | | about the use case for the new parameter. llvm-svn: 208026
OpenPOWER on IntegriCloud