summaryrefslogtreecommitdiff
path: root/tools/bugpoint
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bugpoint')
-rw-r--r--tools/bugpoint/BugDriver.cpp4
-rw-r--r--tools/bugpoint/CrashDebugger.cpp2
-rw-r--r--tools/bugpoint/ExecutionDriver.cpp8
-rw-r--r--tools/bugpoint/ExtractFunction.cpp6
-rw-r--r--tools/bugpoint/Miscompilation.cpp4
-rw-r--r--tools/bugpoint/OptimizerDriver.cpp2
-rw-r--r--tools/bugpoint/ToolRunner.cpp6
-rw-r--r--tools/bugpoint/ToolRunner.h8
-rw-r--r--tools/bugpoint/bugpoint.cpp19
9 files changed, 27 insertions, 32 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp
index 1826b7b780..6d13f96711 100644
--- a/tools/bugpoint/BugDriver.cpp
+++ b/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/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp
index 69837f9c2a..545d767c2a 100644
--- a/tools/bugpoint/CrashDebugger.cpp
+++ b/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/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp
index 62f0a242a6..0687c4c08f 100644
--- a/tools/bugpoint/ExecutionDriver.cpp
+++ b/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/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp
index 7806857f2e..cf02ef73a9 100644
--- a/tools/bugpoint/ExtractFunction.cpp
+++ b/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/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp
index 0b7711b611..bead5dc992 100644
--- a/tools/bugpoint/Miscompilation.cpp
+++ b/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/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp
index c5c437ccdb..23e40fda5c 100644
--- a/tools/bugpoint/OptimizerDriver.cpp
+++ b/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/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index b694127e07..3dc98451de 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -13,9 +13,9 @@
#define DEBUG_TYPE "toolrunner"
#include "llvm/Support/ToolRunner.h"
-#include "Config/config.h" // for HAVE_LINK_R
-#include "Support/Debug.h"
-#include "Support/FileUtilities.h"
+#include "llvm/Config/config.h" // for HAVE_LINK_R
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/FileUtilities.h"
#include <fstream>
#include <sstream>
using namespace llvm;
diff --git a/tools/bugpoint/ToolRunner.h b/tools/bugpoint/ToolRunner.h
index bd085eab6d..c5d89da46d 100644
--- a/tools/bugpoint/ToolRunner.h
+++ b/tools/bugpoint/ToolRunner.h
@@ -1,4 +1,4 @@
-//===-- Support/ToolRunner.h ------------------------------------*- C++ -*-===//
+//===-- llvm/Support/ToolRunner.h -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -14,10 +14,10 @@
//
//===----------------------------------------------------------------------===//
-#ifndef TOOLRUNNER_H
-#define TOOLRUNNER_H
+#ifndef LLVM_SUPPORT_TOOLRUNNER_H
+#define LLVM_SUPPORT_TOOLRUNNER_H
-#include "Support/SystemUtils.h"
+#include "llvm/Support/SystemUtils.h"
#include <exception>
#include <vector>
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp
index 1ff84f2408..a4eae3cecd 100644
--- a/tools/bugpoint/bugpoint.cpp
+++ b/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();