summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Remove use of removed function, llvm_stop_multithreadingDavid Blaikie2014-06-191-2/+0
| | | | llvm-svn: 211291
* Remove support for LLVM runtime multi-threading.Zachary Turner2014-06-191-26/+3
| | | | | | | | | | | | | After a number of previous small iterations, the functions llvm_start_multithreaded() and llvm_stop_multithreaded() have been reduced essentially to no-ops. This change removes them entirely. Reviewed by: rnk, dblaikie Differential Revision: http://reviews.llvm.org/D4216 llvm-svn: 211287
* Kill the LLVM global lock.Zachary Turner2014-06-193-17/+22
| | | | | | | | | | | | | | This patch removes the LLVM global lock, and updates all existing users of the global lock to use their own mutex. None of the existing users of the global lock were protecting code that was mutually exclusive with any of the other users of the global lock, so its purpose was not being met. Reviewed by: rnk Differential Revision: http://reviews.llvm.org/D4142 llvm-svn: 211277
* CommandLine: bail out when options get multiply registeredAlp Toker2014-06-191-3/+13
| | | | | | | | | | These errors are strictly unrecoverable and indicate serious issues such as conflicting option names or an incorrectly linked LLVM distribution. With this change, the errors actually get detected so tests don't pass silently. llvm-svn: 211260
* Revert "Random Number Generator (llvm)"JF Bastien2014-06-182-53/+0
| | | | | | | | This reverts commit cccba093090d127e0b6d17473b14c264c14c5259. It causes build breakage. llvm-svn: 211146
* Random Number Generator (llvm)JF Bastien2014-06-182-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Provides an abstraction for a random number generator (RNG) that produces a stream of pseudo-random numbers. The current implementation uses C++11 facilities and is therefore not cryptographically secure. The RNG is salted with the text of the current command line invocation. In addition, a user may specify a seed (reproducible builds). In clang, the seed can be set via -frandom-seed=X In the back end, the seed can be set via -rng-seed=X This is the llvm part of the patch. clang part: D3391 Reviewers: ahomescu, rinon, nicholas, jfb Reviewed By: jfb Subscribers: jfb, perl Differential Revision: http://reviews.llvm.org/D3390 llvm-svn: 211145
* Merge lib/Support/WindowsError.cpp into ib/Support/ErrorHandling.cpp.Rafael Espindola2014-06-173-92/+69
| | | | | | | The OSX ranlib warns on files with no symbols, and lib/Support/WindowsError.cpp was empty when building on non-windows. llvm-svn: 211118
* Support: Inject LLVM_VERSION_INFO into the Support libraryJustin Bogner2014-06-171-0/+4
| | | | | | | | Mimic r116632 in passing LLVM_VERSION_INFO from the Makefile build system to the build. This improves the -version output of tools that use llvm::cl under the configure+make system. llvm-svn: 211091
* tools: Add a space between package version and LLVM_VERSION_INFOJustin Bogner2014-06-171-1/+1
| | | | | | This reads a little strangely. Add a space to clean it up. llvm-svn: 211090
* Add an overload for SourceMgr::PrintMessage that takes an existing diagnostic.Jordan Rose2014-06-171-8/+11
| | | | llvm-svn: 211087
* Modernize doc comments for SourceMgr.Jordan Rose2014-06-171-12/+0
| | | | | | No functionality change. llvm-svn: 211086
* Revert r211066, 211067, 211068, 211069, 211070.Zachary Turner2014-06-163-28/+46
| | | | | | | These were committed accidentally from the wrong branch before having a review sign-off. llvm-svn: 211072
* Kill the LLVM global lock.Zachary Turner2014-06-163-7/+23
| | | | llvm-svn: 211069
* Remove some code churn.Zachary Turner2014-06-161-1/+1
| | | | llvm-svn: 211068
* Remove some more code out into a separate CL.Zachary Turner2014-06-163-30/+5
| | | | llvm-svn: 211067
* Users of the llvm global mutex must now acquire it manually.Zachary Turner2014-06-163-17/+8
| | | | | | This allows the mutex to be acquired in a guarded, RAII fashion. llvm-svn: 211066
* Support/ConvertUTF: restore compatibility with MSVC, which only implements C89Dmitri Gribenko2014-06-161-5/+7
| | | | llvm-svn: 211016
* Support/ConvertUTF: implement U+FFFD insertion according to the recommendationDmitri Gribenko2014-06-161-8/+143
| | | | | | | | | given in the Unicode spec That is, replace every maximal subpart of an ill-formed subsequence with one U+FFFD. llvm-svn: 211015
* Using llvm::sys::swapByteOrder() for the common case of byte-swapping a ↵Artyom Skrobov2014-06-141-1/+1
| | | | | | value in place llvm-svn: 210978
* Renaming SwapByteOrder() to getSwappedBytes()Artyom Skrobov2014-06-141-1/+1
| | | | | | The next commit will add swapByteOrder(), acting in-place llvm-svn: 210973
* Make the error-handling functions thread-safe.Zachary Turner2014-06-131-4/+19
| | | | | | | | | | | | | Prior to this change, error handling functions must be installed and removed only inside of an llvm_[start/stop]_multithreading pair. This change allows error handling functions to be installed any time, and from any thread. Reviewed by: chandlerc Differential Revision: http://reviews.llvm.org/D4140 llvm-svn: 210937
* Finishing touch for the std::error_code transition.Rafael Espindola2014-06-138-25/+30
| | | | | | | | | | | While std::error_code itself seems to work OK in all platforms, there are few annoying differences with regards to the std::errc enumeration. This patch adds a simple llvm enumeration, which will hopefully avoid build breakages in other platforms and surprises as we get more uses of std::error_code. llvm-svn: 210920
* Fix build on windows.Rafael Espindola2014-06-132-85/+90
| | | | llvm-svn: 210873
* Remove 'using std::errro_code' from lib.Rafael Espindola2014-06-1314-248/+237
| | | | llvm-svn: 210871
* 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
OpenPOWER on IntegriCloud