summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/bugpoint')
-rw-r--r--llvm/tools/bugpoint/BugDriver.cpp4
-rw-r--r--llvm/tools/bugpoint/CrashDebugger.cpp2
-rw-r--r--llvm/tools/bugpoint/ExecutionDriver.cpp8
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp6
-rw-r--r--llvm/tools/bugpoint/Miscompilation.cpp4
-rw-r--r--llvm/tools/bugpoint/OptimizerDriver.cpp2
-rw-r--r--llvm/tools/bugpoint/bugpoint.cpp19
7 files changed, 20 insertions, 25 deletions
diff --git a/llvm/tools/bugpoint/BugDriver.cpp b/llvm/tools/bugpoint/BugDriver.cpp
index 1826b7b780c..6d13f967118 100644
--- a/llvm/tools/bugpoint/BugDriver.cpp
+++ b/llvm/tools/bugpoint/BugDriver.cpp
@@ -20,8 +20,8 @@
#include "llvm/Bytecode/Reader.h"
#include "llvm/Support/Linker.h"
#include "llvm/Support/ToolRunner.h"
-#include "Support/CommandLine.h"
-#include "Support/FileUtilities.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/FileUtilities.h"
#include <iostream>
#include <memory>
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp
index 69837f9c2a8..545d767c2ae 100644
--- a/llvm/tools/bugpoint/CrashDebugger.cpp
+++ b/llvm/tools/bugpoint/CrashDebugger.cpp
@@ -26,7 +26,7 @@
#include "llvm/Support/ToolRunner.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/Cloning.h"
-#include "Support/FileUtilities.h"
+#include "llvm/Support/FileUtilities.h"
#include <fstream>
#include <set>
using namespace llvm;
diff --git a/llvm/tools/bugpoint/ExecutionDriver.cpp b/llvm/tools/bugpoint/ExecutionDriver.cpp
index 62f0a242a6f..0687c4c08f3 100644
--- a/llvm/tools/bugpoint/ExecutionDriver.cpp
+++ b/llvm/tools/bugpoint/ExecutionDriver.cpp
@@ -14,10 +14,10 @@
#include "BugDriver.h"
#include "llvm/Support/ToolRunner.h"
-#include "Support/CommandLine.h"
-#include "Support/Debug.h"
-#include "Support/FileUtilities.h"
-#include "Support/SystemUtils.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/FileUtilities.h"
+#include "llvm/Support/SystemUtils.h"
#include <fstream>
using namespace llvm;
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index 7806857f2ef..cf02ef73a95 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -24,9 +24,9 @@
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/FunctionUtils.h"
#include "llvm/Target/TargetData.h"
-#include "Support/CommandLine.h"
-#include "Support/Debug.h"
-#include "Support/FileUtilities.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/FileUtilities.h"
#include <set>
using namespace llvm;
diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp
index 0b7711b611b..bead5dc9924 100644
--- a/llvm/tools/bugpoint/Miscompilation.cpp
+++ b/llvm/tools/bugpoint/Miscompilation.cpp
@@ -23,8 +23,8 @@
#include "llvm/Support/Mangler.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Support/Linker.h"
-#include "Support/CommandLine.h"
-#include "Support/FileUtilities.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/FileUtilities.h"
using namespace llvm;
namespace llvm {
diff --git a/llvm/tools/bugpoint/OptimizerDriver.cpp b/llvm/tools/bugpoint/OptimizerDriver.cpp
index c5c437ccdb8..23e40fda5c3 100644
--- a/llvm/tools/bugpoint/OptimizerDriver.cpp
+++ b/llvm/tools/bugpoint/OptimizerDriver.cpp
@@ -21,7 +21,7 @@
#include "llvm/Analysis/Verifier.h"
#include "llvm/Bytecode/WriteBytecodePass.h"
#include "llvm/Target/TargetData.h"
-#include "Support/FileUtilities.h"
+#include "llvm/Support/FileUtilities.h"
#include <fstream>
#include <unistd.h>
#include <sys/types.h>
diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp
index 1ff84f24089..a4eae3cecd0 100644
--- a/llvm/tools/bugpoint/bugpoint.cpp
+++ b/llvm/tools/bugpoint/bugpoint.cpp
@@ -16,11 +16,12 @@
#include "BugDriver.h"
#include "llvm/Support/PassNameParser.h"
#include "llvm/Support/ToolRunner.h"
-#include "Support/CommandLine.h"
+#include "llvm/System/SysConfig.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/PluginLoader.h"
#include "llvm/System/Signals.h"
-#include "Support/PluginLoader.h"
-#include "Config/unistd.h"
-#include <sys/resource.h>
+#include "llvm/Config/unistd.h"
+//#include <sys/resource.h>
using namespace llvm;
static cl::list<std::string>
@@ -45,14 +46,8 @@ int main(int argc, char **argv) {
D.addPasses(PassList.begin(), PassList.end());
// Bugpoint has the ability of generating a plethora of core files, so to
- // avoid filling up the disk, set the max core file size to 0.
- struct rlimit rlim;
- rlim.rlim_cur = rlim.rlim_max = 0;
- int res = setrlimit(RLIMIT_CORE, &rlim);
- if (res < 0) {
- // setrlimit() may have failed, but we're not going to let that stop us
- perror("setrlimit: RLIMIT_CORE");
- }
+ // avoid filling up the disk, we prevent it
+ sys::PreventCoreFiles();
try {
return D.run();
OpenPOWER on IntegriCloud