X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fbugpoint%2FCrashDebugger.cpp;h=c8b4f6f73e92b77daa6797f4e39d8048a2001d30;hb=1b0dc64919e947bb4f4677b138c734e33061f7c4;hp=ed211a600816c0564058c2853b92362b8dee11c1;hpb=0b8c9a80f20772c3793201ab5b251d3520b9cea3;p=oota-llvm.git diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index ed211a60081..c8b4f6f73e9 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/tools/bugpoint/CrashDebugger.cpp @@ -62,25 +62,23 @@ ReducePassList::TestResult ReducePassList::doTest(std::vector &Prefix, std::vector &Suffix, std::string &Error) { - sys::Path PrefixOutput; + std::string PrefixOutput; Module *OrigProgram = 0; if (!Prefix.empty()) { outs() << "Checking to see if these passes crash: " << getPassesString(Prefix) << ": "; - std::string PfxOutput; - if (BD.runPasses(BD.getProgram(), Prefix, PfxOutput)) + if (BD.runPasses(BD.getProgram(), Prefix, PrefixOutput)) return KeepPrefix; - PrefixOutput.set(PfxOutput); OrigProgram = BD.Program; - BD.Program = ParseInputFile(PrefixOutput.str(), BD.getContext()); + BD.Program = ParseInputFile(PrefixOutput, BD.getContext()); if (BD.Program == 0) { errs() << BD.getToolName() << ": Error reading bitcode file '" - << PrefixOutput.str() << "'!\n"; + << PrefixOutput << "'!\n"; exit(1); } - PrefixOutput.eraseFromDisk(); + sys::fs::remove(PrefixOutput); } outs() << "Checking to see if these passes crash: "