summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-14 06:17:09 +0000
committerChris Lattner <sabre@nondot.org>2006-09-14 06:17:09 +0000
commit3f0ffd31cf0331fb3f26f34353bcc34124b7dc7e (patch)
tree8b1fa55027c8c03febaa3a915cd880ab8c2d3250 /llvm/tools
parent2f107cfc0d620a6dc6490d8daa9528b517caac20 (diff)
downloadbcm5719-llvm-3f0ffd31cf0331fb3f26f34353bcc34124b7dc7e.tar.gz
bcm5719-llvm-3f0ffd31cf0331fb3f26f34353bcc34124b7dc7e.zip
add a new (hidden) -disable-core-files option
llvm-svn: 30318
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/lli/lli.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index be9f999a546..a9d905968f9 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -23,6 +23,7 @@
#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/PluginLoader.h"
+#include "llvm/System/Process.h"
#include "llvm/System/Signals.h"
#include <iostream>
@@ -45,6 +46,10 @@ namespace {
FakeArgv0("fake-argv0",
cl::desc("Override the 'argv[0]' value passed into the executing"
" program"), cl::value_desc("executable"));
+
+ cl::opt<bool>
+ DisableCoreFiles("disable-core-files", cl::Hidden,
+ cl::desc("Disable emission of core files if possible"));
}
//===----------------------------------------------------------------------===//
@@ -56,6 +61,10 @@ int main(int argc, char **argv, char * const *envp) {
" llvm interpreter & dynamic compiler\n");
sys::PrintStackTraceOnErrorSignal();
+ // If the user doesn't want core files, disable them.
+ if (DisableCoreFiles)
+ sys::Process::PreventCoreFiles();
+
// Load the bytecode...
std::string ErrorMsg;
ModuleProvider *MP = 0;
OpenPOWER on IntegriCloud