llvm.org GIT mirror llvm / f5c8146
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 Chris Lattner 16 years ago
2 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
136136 /// specified (if deleteIt is true).
137137 ///
138138 class FileRemover {
139 bool DeleteIt;
140139 std::string Filename;
140 bool DeleteIt;
141141 public:
142 FileRemover(bool deleteIt, const std::string &filename)
143 : DeleteIt(deleteIt), Filename(filename) {}
142 FileRemover(const std::string &filename, bool deleteIt = true)
143 : Filename(filename), DeleteIt(deleteIt) {}
144144
145145 ~FileRemover() {
146146 if (DeleteIt) removeFile(Filename);
136136 /// specified (if deleteIt is true).
137137 ///
138138 class FileRemover {
139 bool DeleteIt;
140139 std::string Filename;
140 bool DeleteIt;
141141 public:
142 FileRemover(bool deleteIt, const std::string &filename)
143 : DeleteIt(deleteIt), Filename(filename) {}
142 FileRemover(const std::string &filename, bool deleteIt = true)
143 : Filename(filename), DeleteIt(deleteIt) {}
144144
145145 ~FileRemover() {
146146 if (DeleteIt) removeFile(Filename);