Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp
index 1826b7b..6d13f96 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 69837f9..545d767 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 62f0a24..0687c4c 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 7806857..cf02ef7 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 0b7711b..bead5dc 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 c5c437c..23e40fd 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 b694127..3dc9845 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 bd085ea..c5d89da 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 1ff84f2..a4eae3c 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 @@
   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();