Go to file
Serge Pavlov d48042efa8 Report fatal error in the case of out of memory
This is partial recommit of r325224, reverted in 325227. The relevant
part of original comment is below.

Analysis of fails in the case of out of memory errors can be tricky on
Windows. Such error emerges at the point where memory allocation function
fails, but manifests itself when null pointer is used. These two points
may be distant from each other. Besides, next runs may not exhibit
allocation error.

Usual programming practice does not require checking result of 'operator
new' because it throws 'std::bad_alloc' in the case of allocation error.
However, LLVM is usually built with exceptions turned off, so 'new' can
return null pointer. This change installs custom new handler, which causes
fatal error in the case of out of memory. The handler is installed
automatically prior to call to 'main' during construction of a static
object defined in 'lib/Support/ErrorHandling.cpp'. If the application does
not use this file, the handler may be installed manually by a call to
'llvm::install_out_of_memory_new_handler', declared in
'include/llvm/Support/ErrorHandling.h".

Differential Revision: https://reviews.llvm.org/D43010

llvm-svn: 325426
2018-02-17 10:21:33 +00:00
clang [Basic] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-02-16 23:40:07 +00:00
clang-tools-extra [clangd] Rename some protocol field to lower case 2018-02-16 23:12:26 +00:00
compiler-rt Add initial XRay support for NetBSD 2018-02-16 14:45:20 +00:00
debuginfo-tests [debuginfo-tests] Support moving debuginfo-tests to llvm/projects 2017-12-12 16:54:20 +00:00
libclc amdgpu/half_recip: Switch implementation to native_recip 2018-02-13 22:09:46 +00:00
libcxx Fix test failure on compilers w/o deduction guides 2018-02-15 02:41:19 +00:00
libcxxabi [demangler] Support for exception specifications on function types. 2018-02-14 01:08:20 +00:00
libunwind [cmake] [libunwind] LLVM_FOUND isn't always set, so just test if 2018-01-27 19:31:44 +00:00
lld [WebAssembly] Remove unneeded classifer methods from Symbol class. NFC. 2018-02-17 00:44:21 +00:00
lldb Shorten socket names in TestPlatformProcessConnect 2018-02-16 12:57:35 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm Report fatal error in the case of out of memory 2018-02-17 10:21:33 +00:00
openmp [OMPT] Omissionin in OMPT Formatting 2018-02-17 09:54:10 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ScopBuilder] scalar-indep: Fix mutually referencing PHIs. 2018-02-12 21:09:40 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.