#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>
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"));
}
//===----------------------------------------------------------------------===//
" 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;