summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/CrashDebugger.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-16 23:04:20 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-16 23:04:20 +0000
commit584cb0a8c117859197b29cb88e85455e4476a9e4 (patch)
tree029ee92c10cba7c0cb39b2b780b41d6f14984dff /llvm/tools/bugpoint/CrashDebugger.cpp
parentbeb9946af80b8a940ae2051529bf3028d2e7523f (diff)
downloadbcm5719-llvm-584cb0a8c117859197b29cb88e85455e4476a9e4.tar.gz
bcm5719-llvm-584cb0a8c117859197b29cb88e85455e4476a9e4.zip
For PR351:
* removeFile() -> sys::Path::destroyFile() * remove extraneous toString() calls * convert local variables representing path names from std::string to sys::Path * Use sys::Path objects with FileRemove instead of std::string * Use sys::Path methods for construction of path names llvm-svn: 19001
Diffstat (limited to 'llvm/tools/bugpoint/CrashDebugger.cpp')
-rw-r--r--llvm/tools/bugpoint/CrashDebugger.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp
index 545d767c2ae..7dd6db4ab58 100644
--- a/llvm/tools/bugpoint/CrashDebugger.cpp
+++ b/llvm/tools/bugpoint/CrashDebugger.cpp
@@ -49,23 +49,25 @@ namespace llvm {
ReducePassList::TestResult
ReducePassList::doTest(std::vector<const PassInfo*> &Prefix,
std::vector<const PassInfo*> &Suffix) {
- std::string PrefixOutput;
+ sys::Path PrefixOutput;
Module *OrigProgram = 0;
if (!Prefix.empty()) {
std::cout << "Checking to see if these passes crash: "
<< getPassesString(Prefix) << ": ";
- if (BD.runPasses(Prefix, PrefixOutput))
+ std::string PfxOutput;
+ if (BD.runPasses(Prefix, PfxOutput))
return KeepPrefix;
+ PrefixOutput.setFile(PfxOutput);
OrigProgram = BD.Program;
- BD.Program = ParseInputFile(PrefixOutput);
+ BD.Program = ParseInputFile(PrefixOutput.toString());
if (BD.Program == 0) {
std::cerr << BD.getToolName() << ": Error reading bytecode file '"
<< PrefixOutput << "'!\n";
exit(1);
}
- removeFile(PrefixOutput);
+ PrefixOutput.destroyFile();
}
std::cout << "Checking to see if these passes crash: "
OpenPOWER on IntegriCloud