Change the order of the arguments to the ctor, allowing us to make the boolean defaul...
authorChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2004 20:20:52 +0000 (20:20 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2004 20:20:52 +0000 (20:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11592 91177308-0d34-0410-b5e6-96231b3b80d8

include/Support/FileUtilities.h
include/llvm/Support/FileUtilities.h

index 7ccb69434917f869742035db0adea3186066ecbe..0543d76f5a991658c98f24c6206c3c3ce35471e6 100644 (file)
@@ -137,11 +137,11 @@ public:
   /// specified (if deleteIt is true).
   ///
   class FileRemover {
-    bool DeleteIt; 
     std::string Filename;
+    bool DeleteIt;
   public:
-    FileRemover(bool deleteIt, const std::string &filename)
-      : DeleteIt(deleteIt), Filename(filename) {}
+    FileRemover(const std::string &filename, bool deleteIt = true)
+      : Filename(filename), DeleteIt(deleteIt) {}
     
     ~FileRemover() {
       if (DeleteIt) removeFile(Filename);
index 7ccb69434917f869742035db0adea3186066ecbe..0543d76f5a991658c98f24c6206c3c3ce35471e6 100644 (file)
@@ -137,11 +137,11 @@ public:
   /// specified (if deleteIt is true).
   ///
   class FileRemover {
-    bool DeleteIt; 
     std::string Filename;
+    bool DeleteIt;
   public:
-    FileRemover(bool deleteIt, const std::string &filename)
-      : DeleteIt(deleteIt), Filename(filename) {}
+    FileRemover(const std::string &filename, bool deleteIt = true)
+      : Filename(filename), DeleteIt(deleteIt) {}
     
     ~FileRemover() {
       if (DeleteIt) removeFile(Filename);