[llvm-commits] CVS: llvm/include/llvm/System/Path.h
Reid Spencer
reid at x10sys.com
Tue Dec 14 17:50:24 PST 2004
Changes in directory llvm/include/llvm/System:
Path.h updated: 1.16 -> 1.17
---
Log message:
For PR351: http://llvm.cs.uiuc.edu/PR351 :
* Fix implementation and documentation about LLVMGCCDIR/bytecode-libs
* Add the makeUnique method, replacement for getUniqueFilename in Support.
* Add the sys::CopyFile function, replacement for CopyFile in Support.
* Move GetLLVMConfigDir() into generic code area since its generic.
---
Diffs of the changes: (+16 -1)
Index: llvm/include/llvm/System/Path.h
diff -u llvm/include/llvm/System/Path.h:1.16 llvm/include/llvm/System/Path.h:1.17
--- llvm/include/llvm/System/Path.h:1.16 Mon Dec 13 13:59:50 2004
+++ llvm/include/llvm/System/Path.h Tue Dec 14 19:50:13 2004
@@ -100,7 +100,8 @@
/// Construct a vector of sys::Path that contains the "standard" bytecode
/// library paths suitable for linking into an llvm program. This function
/// *must* return the value of LLVM_LIB_SEARCH_PATH as well as the values
- /// of LLVM_LIBDIR and LLVMGCCDIR/bytecode-libs. It also must provide the
+ /// of LLVM_LIBDIR and LLVMGCCDIR/lib (if --with-llvmgccdir was specified
+ /// when LLVM was configured). It also must provide the
/// System library paths as returned by GetSystemLibraryPaths.
/// @brief Construct a list of directories in which bytecode could be
/// found.
@@ -487,6 +488,14 @@
/// @brief Remove the suffix from a path name.
bool elideSuffix();
+ /// The current Path name is made unique in the file system. Upon return,
+ /// the Path will have been changed to make a unique file in the file
+ /// system or it will not have been changed if the current path name is
+ /// already unique.
+ /// @throws std::string if an unrecoverable error occurs.
+ /// @brief Make the current path name unique in the file system.
+ void makeUnique();
+
/// This method attempts to create a directory in the file system with the
/// same name as the Path object. The \p create_parents parameter controls
/// whether intermediate directories are created or not. if \p
@@ -577,6 +586,12 @@
/// This utility function allows any memory block to be examined in order
/// to determine its file type.
LLVMFileType IdentifyFileType(const char*magic, unsigned length);
+
+ /// This function can be used to copy the file specified by Src to the
+ /// file specified by Dest. If an error occurs, Dest is removed.
+ /// @throws std::string if an error opening or writing the files occurs.
+ /// @brief Copy one file to another.
+ void CopyFiles(const Path& Dest, const Path& Src);
}
inline std::ostream& operator<<(std::ostream& strm, const sys::Path& aPath) {
More information about the llvm-commits
mailing list