-private:
- /// ParseInputFile - Given a bytecode or assembly input filename, parse and
- /// return it, or return null if not possible.
- ///
- Module *ParseInputFile(const std::string &InputFilename) const;
-
- /// writeProgramToFile - This writes the current "Program" to the named
- /// bytecode file. If an error occurs, true is returned.
- ///
- bool writeProgramToFile(const std::string &Filename, Module *M = 0) const;
-
- /// runPasses - Run the specified passes on Program, outputting a bytecode
+ /// ExtractMappedBlocksFromModule - Extract all but the specified basic blocks
+ /// into their own functions. The only detail is that M is actually a module
+ /// cloned from the one the BBs are in, so some mapping needs to be performed.
+ /// If this operation fails for some reason (ie the implementation is buggy),
+ /// this function should return null, otherwise it returns a new Module.
+ Module *ExtractMappedBlocksFromModule(const std::vector<BasicBlock*> &BBs,
+ Module *M);
+
+ /// runPassesOn - Carefully run the specified set of pass on the specified
+ /// module, returning the transformed module on success, or a null pointer on
+ /// failure. If AutoDebugCrashes is set to true, then bugpoint will
+ /// automatically attempt to track down a crashing pass if one exists, and
+ /// this method will never return null.
+ Module *runPassesOn(Module *M, const std::vector<std::string> &Passes,
+ bool AutoDebugCrashes = false, unsigned NumExtraArgs = 0,
+ const char * const *ExtraArgs = nullptr);
+
+ /// runPasses - Run the specified passes on Program, outputting a bitcode