bool addSources(const std::vector<std::string> &FileNames);
template<class It>
void addPasses(It I, It E) { PassesToRun.insert(PassesToRun.end(), I, E); }
+ void setPassesToRun(const std::vector<const PassInfo*> &PTR) {
+ PassesToRun = PTR;
+ }
/// run - The top level method that is invoked after all of the instance
/// variables are set up from command line arguments.
// prefix passes, then discard the prefix passes.
//
if (BD.runPasses(Prefix, BytecodeResult, false/*delete*/, true/*quiet*/)) {
- std::cerr << BD.getToolName() << ": Error running this sequence of passes"
+ std::cerr << ": Error running this sequence of passes"
<< " on the input program!\n";
+ BD.setPassesToRun(Prefix);
+ BD.EmitProgressBytecode("pass-error", false);
exit(1);
}
Module *OriginalInput = BD.Program;
BD.Program = PrefixOutput;
if (BD.runPasses(Suffix, BytecodeResult, false/*delete*/, true/*quiet*/)) {
- std::cerr << BD.getToolName() << ": Error running this sequence of passes"
+ std::cerr << ": Error running this sequence of passes"
<< " on the input program!\n";
+ BD.setPassesToRun(Prefix);
+ BD.EmitProgressBytecode("pass-error", false);
exit(1);
}