summaryrefslogtreecommitdiff
path: root/tools/bugpoint
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-03-31 13:04:19 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-03-31 13:04:19 +0000
commitc9c08fb3a7fb5e8ea3e1477a88507704c7a70ba1 (patch)
tree09765d1b73ddfab76c21df840c3d6b9905521320 /tools/bugpoint
parentdc5198bac7e3f9b61617c8c46a1c28a84daa9325 (diff)
downloadllvm-c9c08fb3a7fb5e8ea3e1477a88507704c7a70ba1.tar.gz
llvm-c9c08fb3a7fb5e8ea3e1477a88507704c7a70ba1.tar.bz2
llvm-c9c08fb3a7fb5e8ea3e1477a88507704c7a70ba1.tar.xz
Switch FileRemover from PathV1 to V2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint')
-rw-r--r--tools/bugpoint/BugDriver.cpp2
-rw-r--r--tools/bugpoint/ExecutionDriver.cpp5
-rw-r--r--tools/bugpoint/Miscompilation.cpp6
-rw-r--r--tools/bugpoint/ToolRunner.cpp6
4 files changed, 10 insertions, 9 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp
index 1cbf6328b3..c3decd64a0 100644
--- a/tools/bugpoint/BugDriver.cpp
+++ b/tools/bugpoint/BugDriver.cpp
@@ -194,7 +194,7 @@ bool BugDriver::run(std::string &ErrMsg) {
// Make sure the reference output file gets deleted on exit from this
// function, if appropriate.
sys::Path ROF(ReferenceOutputFile);
- FileRemover RemoverInstance(ROF, CreatedOutput && !SaveTemps);
+ FileRemover RemoverInstance(ROF.str(), CreatedOutput && !SaveTemps);
// Diff the output of the raw program against the reference output. If it
// matches, then we assume there is a miscompilation bug and try to
diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp
index f1601cdb84..9be9dfd650 100644
--- a/tools/bugpoint/ExecutionDriver.cpp
+++ b/tools/bugpoint/ExecutionDriver.cpp
@@ -323,7 +323,7 @@ void BugDriver::compileProgram(Module *M, std::string *Error) const {
}
// Remove the temporary bitcode file when we are done.
- FileRemover BitcodeFileRemover(BitcodeFile, !SaveTemps);
+ FileRemover BitcodeFileRemover(BitcodeFile.str(), !SaveTemps);
// Actually compile the program!
Interpreter->compileProgram(BitcodeFile.str(), Error, Timeout, MemoryLimit);
@@ -364,7 +364,8 @@ std::string BugDriver::executeProgram(const Module *Program,
// Remove the temporary bitcode file when we are done.
sys::Path BitcodePath(BitcodeFile);
- FileRemover BitcodeFileRemover(BitcodePath, CreatedBitcode && !SaveTemps);
+ FileRemover BitcodeFileRemover(BitcodePath.str(),
+ CreatedBitcode && !SaveTemps);
if (OutputFile.empty()) OutputFile = OutputPrefix + "-execution-output";
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp
index a9c06fdbbd..d059041380 100644
--- a/tools/bugpoint/Miscompilation.cpp
+++ b/tools/bugpoint/Miscompilation.cpp
@@ -943,7 +943,7 @@ static bool TestCodeGenerator(BugDriver &BD, Module *Test, Module *Safe,
}
delete Test;
- FileRemover TestModuleBCRemover(TestModuleBC, !SaveTemps);
+ FileRemover TestModuleBCRemover(TestModuleBC.str(), !SaveTemps);
// Make the shared library
sys::Path SafeModuleBC("bugpoint.safe.bc");
@@ -959,14 +959,14 @@ static bool TestCodeGenerator(BugDriver &BD, Module *Test, Module *Safe,
exit(1);
}
- FileRemover SafeModuleBCRemover(SafeModuleBC, !SaveTemps);
+ FileRemover SafeModuleBCRemover(SafeModuleBC.str(), !SaveTemps);
std::string SharedObject = BD.compileSharedObject(SafeModuleBC.str(), Error);
if (!Error.empty())
return false;
delete Safe;
- FileRemover SharedObjectRemover(sys::Path(SharedObject), !SaveTemps);
+ FileRemover SharedObjectRemover(SharedObject, !SaveTemps);
// Run the code generator on the `Test' code, loading the shared library.
// The function returns whether or not the new output differs from reference.
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index 37cc9028e0..1719703b57 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -503,7 +503,7 @@ int LLC::ExecuteProgram(const std::string &Bitcode,
sys::Path OutputAsmFile;
GCC::FileType FileKind = OutputCode(Bitcode, OutputAsmFile, *Error, Timeout,
MemoryLimit);
- FileRemover OutFileRemover(OutputAsmFile, !SaveTemps);
+ FileRemover OutFileRemover(OutputAsmFile.str(), !SaveTemps);
std::vector<std::string> GCCArgs(ArgsForGCC);
GCCArgs.insert(GCCArgs.end(), SharedLibs.begin(), SharedLibs.end());
@@ -675,7 +675,7 @@ int CBE::ExecuteProgram(const std::string &Bitcode,
sys::Path OutputCFile;
OutputCode(Bitcode, OutputCFile, *Error, Timeout, MemoryLimit);
- FileRemover CFileRemove(OutputCFile, !SaveTemps);
+ FileRemover CFileRemove(OutputCFile.str(), !SaveTemps);
std::vector<std::string> GCCArgs(ArgsForGCC);
GCCArgs.insert(GCCArgs.end(), SharedLibs.begin(), SharedLibs.end());
@@ -851,7 +851,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
errs() << "\n";
);
- FileRemover OutputBinaryRemover(OutputBinary, !SaveTemps);
+ FileRemover OutputBinaryRemover(OutputBinary.str(), !SaveTemps);
if (RemoteClientPath.isEmpty()) {
DEBUG(errs() << "<run locally>");