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
diff --git a/llvm/tools/bugpoint/BugDriver.cpp b/llvm/tools/bugpoint/BugDriver.cpp
index 4b6db0c..0116ab0 100644
--- a/llvm/tools/bugpoint/BugDriver.cpp
+++ b/llvm/tools/bugpoint/BugDriver.cpp
@@ -175,7 +175,7 @@
 
   // Make sure the reference output file gets deleted on exit from this
   // function, if appropriate.
-  FileRemover RemoverInstance(ReferenceOutputFile, CreatedOutput);
+  FileRemover RemoverInstance(sys::Path(ReferenceOutputFile), CreatedOutput);
 
   // Diff the output of the raw program against the reference output.  If it
   // matches, then we have a miscompilation bug.