diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 11:41:25 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 11:41:25 +0000 |
| commit | d9484dd61cc151c4f34c31e07f693fefa66316b5 (patch) | |
| tree | ab0560b3da293f1fafd3269c59692e929418f5c2 /contrib/llvm/lib/Support/Process.cpp | |
| parent | 79e0962d4c3cf1f0acf359a9d69cb3ac68c414c4 (diff) | |
| parent | d8e91e46262bc44006913e6796843909f1ac7bcd (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/lib/Support/Process.cpp')
| -rw-r--r-- | contrib/llvm/lib/Support/Process.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm/lib/Support/Process.cpp b/contrib/llvm/lib/Support/Process.cpp index 3f5a9d722ca0..f32355aefbb7 100644 --- a/contrib/llvm/lib/Support/Process.cpp +++ b/contrib/llvm/lib/Support/Process.cpp @@ -15,6 +15,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Config/llvm-config.h" +#include "llvm/Config/config.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/Program.h" @@ -82,12 +83,11 @@ static const char colorcodes[2][2][8][10] = { { ALLCOLORS("4",""), ALLCOLORS("4","1;") } }; -// This is set to true when Process::PreventCoreFiles() is called. -static bool coreFilesPrevented = false; +// A CMake option controls wheter we emit core dumps by default. An application +// may disable core dumps by calling Process::PreventCoreFiles(). +static bool coreFilesPrevented = !LLVM_ENABLE_CRASH_DUMPS; -bool Process::AreCoreFilesPrevented() { - return coreFilesPrevented; -} +bool Process::AreCoreFilesPrevented() { return coreFilesPrevented; } // Include the platform-specific parts of this class. #ifdef LLVM_ON_UNIX |
