From f5c8146a7cf899a678dc3979df6a3c99d7f19fc3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 18 Feb 2004 20:20:52 +0000 Subject: [PATCH] Change the order of the arguments to the ctor, allowing us to make the boolean default to true git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11592 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/Support/FileUtilities.h | 6 +++--- include/llvm/Support/FileUtilities.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/Support/FileUtilities.h b/include/Support/FileUtilities.h index 7ccb6943491..0543d76f5a9 100644 --- a/include/Support/FileUtilities.h +++ b/include/Support/FileUtilities.h @@ -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); diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h index 7ccb6943491..0543d76f5a9 100644 --- a/include/llvm/Support/FileUtilities.h +++ b/include/llvm/Support/FileUtilities.h @@ -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); -- 2.34.1