[llvm-commits] CVS: llvm/lib/Support/FileUtilities.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Dec 29 20:46:05 PST 2003


Changes in directory llvm/lib/Support:

FileUtilities.cpp updated: 1.16 -> 1.17

---
Log message:

Further revisions of the FDHandle idea.  In this version we use ownership 
semantics that are the same as those used by std::auto_ptr.  This allows
copying of FDHandle's, but copying transfers ownership.


---
Diffs of the changes:  (+0 -8)

Index: llvm/lib/Support/FileUtilities.cpp
diff -u llvm/lib/Support/FileUtilities.cpp:1.16 llvm/lib/Support/FileUtilities.cpp:1.17
--- llvm/lib/Support/FileUtilities.cpp:1.16	Mon Dec 29 15:43:58 2003
+++ llvm/lib/Support/FileUtilities.cpp	Mon Dec 29 20:45:16 2003
@@ -209,11 +209,3 @@
   return *this;
 }
 
-
-/// take - Take ownership of the file descriptor away from the FDHandle
-/// object, so that the file is not closed when the FDHandle is destroyed.
-int FDHandle::take() throw() {
-  int Ret = FD;
-  FD = -1;
-  return Ret;
-}





More information about the llvm-commits mailing list