//===- OptimizerDriver.cpp - Allow BugPoint to run passes safely ----------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
//
// This file defines an interface that allows bugpoint to run various passes
-// without the threat of a buggy pass corrupting bugpoint (of course bugpoint
-// may have it's own bugs, but that's another story...). It acheives this by
+// without the threat of a buggy pass corrupting bugpoint (of course, bugpoint
+// may have its own bugs, but that's another story...). It achieves this by
// forking a copy of itself and having the child process do the optimizations.
// If this client dies, we can always fork a new one. :)
//
//===----------------------------------------------------------------------===//
#include "BugDriver.h"
-#include "SystemUtils.h"
#include "llvm/PassManager.h"
#include "llvm/Analysis/Verifier.h"
#include "llvm/Bytecode/WriteBytecodePass.h"
#include "llvm/Target/TargetData.h"
+#include "Support/FileUtilities.h"
+#include <fstream>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fstream>
/// writeProgramToFile - This writes the current "Program" to the named bytecode
/// file. If an error occurs, true is returned.
/// EmitProgressBytecode - This function is used to output the current Program
-/// to a file named "bugpoing-ID.bc".
+/// to a file named "bugpoint-ID.bc".
///
void BugDriver::EmitProgressBytecode(const std::string &ID, bool NoFlyer) {
// Output the input to the current pass to a bytecode file, emit a message
}
/// runPasses - Run the specified passes on Program, outputting a bytecode file
-/// and writting the filename into OutputFile if successful. If the
+/// and writing the filename into OutputFile if successful. If the
/// optimizations fail for some reason (optimizer crashes), return true,
/// otherwise return false. If DeleteOutput is set to true, the bytecode is
/// deleted on success, and the filename string is undefined. This prints to