Added copyright header to all C++ source files.
[oota-llvm.git] / tools / bugpoint / OptimizerDriver.cpp
index d6beef541bd4f3f51d9cde79de1f6a6b2ed2d6f5..424a7aad140a96a7827dfdece1bd93906566af7d 100644 (file)
@@ -1,24 +1,31 @@
 //===- 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.
@@ -33,7 +40,7 @@ bool BugDriver::writeProgramToFile(const std::string &Filename,
 
 
 /// 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
@@ -95,7 +102,7 @@ static void RunChild(Module *Program,const std::vector<const PassInfo*> &Passes,
 }
 
 /// 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