This class got moved to FileUtilities.h
authorChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2004 17:17:10 +0000 (17:17 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2004 17:17:10 +0000 (17:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11583 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/BugDriver.cpp

index bbfdf27b9ee5d89ffa02974af776e7a68a310a78..0b06bc3fdbd7500ef5e7d8f9d3673e2837e5f19e 100644 (file)
@@ -151,14 +151,7 @@ bool BugDriver::run() {
 
   // Make sure the reference output file gets deleted on exit from this
   // function, if appropriate.
-  struct Remover {
-    bool DeleteIt; const std::string &Filename;
-    Remover(bool deleteIt, const std::string &filename)
-      : DeleteIt(deleteIt), Filename(filename) {}
-    ~Remover() {
-      if (DeleteIt) removeFile(Filename);
-    }
-  } RemoverInstance(CreatedOutput, ReferenceOutputFile);
+  FileRemover RemoverInstance(CreatedOutput, ReferenceOutputFile);
 
   // Diff the output of the raw program against the reference output.  If it
   // matches, then we have a miscompilation bug.