summaryrefslogtreecommitdiff
path: root/include/llvm/Support/FileUtilities.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-18 20:20:52 +0000
committerChris Lattner <sabre@nondot.org>2004-02-18 20:20:52 +0000
commitf5c8146a7cf899a678dc3979df6a3c99d7f19fc3 (patch)
treea662fb33c20685f246efe62d94ed09d376487bda /include/llvm/Support/FileUtilities.h
parent5f0e3012094ff4ffcc79769315489b4ad240f72c (diff)
downloadllvm-f5c8146a7cf899a678dc3979df6a3c99d7f19fc3.tar.gz
llvm-f5c8146a7cf899a678dc3979df6a3c99d7f19fc3.tar.bz2
llvm-f5c8146a7cf899a678dc3979df6a3c99d7f19fc3.tar.xz
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
Diffstat (limited to 'include/llvm/Support/FileUtilities.h')
-rw-r--r--include/llvm/Support/FileUtilities.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h
index 7ccb694349..0543d76f5a 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);