minor cleanups. Add provisions for a new standard BLOCKINFO_BLOCK
[oota-llvm.git] / tools / bugpoint / BugDriver.cpp
index 236e8a3cac193ea7ca5210701e95ea1be4cdcb69..b2a8f030c5f4ebb5f4a1296aaa16879e649ea816 100644 (file)
@@ -21,6 +21,7 @@
 #include "llvm/Assembly/Parser.h"
 #include "llvm/Bytecode/Reader.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compressor.h"
 #include "llvm/Support/FileUtilities.h"
 #include <iostream>
 #include <memory>
@@ -63,10 +64,10 @@ std::string llvm::getPassesString(const std::vector<const PassInfo*> &Passes) {
 }
 
 BugDriver::BugDriver(const char *toolname, bool as_child, bool find_bugs,
-                     unsigned timeout)
+                     unsigned timeout, unsigned memlimit)
   : ToolName(toolname), ReferenceOutputFile(OutputFile),
     Program(0), Interpreter(0), cbe(0), gcc(0), run_as_child(as_child),
-    run_find_bugs(find_bugs), Timeout(timeout) {}
+    run_find_bugs(find_bugs), Timeout(timeout), MemoryLimit(memlimit) {}
 
 
 /// ParseInputFile - Given a bytecode or assembly input filename, parse and
@@ -74,7 +75,8 @@ BugDriver::BugDriver(const char *toolname, bool as_child, bool find_bugs,
 ///
 Module *llvm::ParseInputFile(const std::string &InputFilename) {
   ParseError Err;
-  Module *Result = ParseBytecodeFile(InputFilename);
+  Module *Result = ParseBytecodeFile(InputFilename,
+                                     Compressor::decompressToNewBuffer);
   if (!Result && !(Result = ParseAssemblyFile(InputFilename,&Err))) {
     std::cerr << "bugpoint: " << Err.getMessage() << "\n"; 
     Result = 0;