#ifndef BUGDRIVER_H
#define BUGDRIVER_H
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/Support/CommandLine.h"
+#include "llvm/ADT/ValueMap.h"
#include <vector>
#include <string>
-extern llvm::cl::opt<bool> StripDebug;
-
namespace llvm {
class Value;
bool RemoveBitcode = false,
std::string *Error = 0);
- /// EmitProgressBitcode - This function is used to output the current Program
- /// to a file named "bugpoint-ID.bc".
+ /// EmitProgressBitcode - This function is used to output M to a file named
+ /// "bugpoint-ID.bc".
///
- void EmitProgressBitcode(const std::string &ID, bool NoFlyer = false);
+ void EmitProgressBitcode(const Module *M, const std::string &ID,
+ bool NoFlyer = false);
/// deleteInstructionFromProgram - This method clones the current Program and
/// deletes the specified instruction from the cloned module. It then runs a
/// recreate the failure. This returns true if a compiler error is found.
///
bool runManyPasses(const std::vector<const PassInfo*> &AllPasses,
- std::string &ErrMsg);
+ std::string &ErrMsg);
/// writeProgramToFile - This writes the current "Program" to the named
/// bitcode file. If an error occurs, true is returned.
///
- bool writeProgramToFile(const std::string &Filename, Module *M = 0) const;
+ bool writeProgramToFile(const std::string &Filename, const Module *M) const;
private:
/// runPasses - Just like the method above, but this just returns true or
/// module, split the functions OUT of the specified module, and place them in
/// the new module.
Module *SplitFunctionsOutOfModule(Module *M, const std::vector<Function*> &F,
- DenseMap<const Value*, Value*> &ValueMap);
+ ValueMap<const Value*, Value*> &VMap);
} // End llvm namespace