summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/Support/Process.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-06-23 21:36:31 +0000
committerpatrick <patrick@openbsd.org>2019-06-23 21:36:31 +0000
commit23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch)
treef7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/lib/Support/Process.cpp
parentsort previous; ok deraadt (diff)
downloadwireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz
wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/Support/Process.cpp')
-rw-r--r--gnu/llvm/lib/Support/Process.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/gnu/llvm/lib/Support/Process.cpp b/gnu/llvm/lib/Support/Process.cpp
index 3f5a9d722ca..f32355aefbb 100644
--- a/gnu/llvm/lib/Support/Process.cpp
+++ b/gnu/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