[llvm-commits] CVS: llvm/include/llvm/Bytecode/Archive.h

Chris Lattner lattner at cs.uiuc.edu
Fri Jul 28 15:04:08 PDT 2006



Changes in directory llvm/include/llvm/Bytecode:

Archive.h updated: 1.16 -> 1.17
---
Log message:

Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.


---
Diffs of the changes:  (+9 -10)

 Archive.h |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)


Index: llvm/include/llvm/Bytecode/Archive.h
diff -u llvm/include/llvm/Bytecode/Archive.h:1.16 llvm/include/llvm/Bytecode/Archive.h:1.17
--- llvm/include/llvm/Bytecode/Archive.h:1.16	Fri Jul  7 15:56:50 2006
+++ llvm/include/llvm/Bytecode/Archive.h	Fri Jul 28 17:03:43 2006
@@ -40,7 +40,6 @@
 /// of the Archive class instead.
 /// @brief This class represents a single archive member.
 class ArchiveMember {
-
   /// @name Types
   /// @{
   public:
@@ -75,28 +74,28 @@
     /// have any applicability on non-Unix systems but is a required component
     /// of the "ar" file format.
     /// @brief Get the user associated with this archive member.
-    unsigned getUser() const             { return info.user; }
+    unsigned getUser() const             { return info.getUser(); }
 
     /// The "group" is the owning group of the file per Unix security. This
     /// may not have any applicability on non-Unix systems but is a required
     /// component of the "ar" file format.
     /// @brief Get the group associated with this archive member.
-    unsigned getGroup() const            { return info.group; }
+    unsigned getGroup() const            { return info.getGroup(); }
 
     /// The "mode" specifies the access permissions for the file per Unix
     /// security. This may not have any applicabiity on non-Unix systems but is
     /// a required component of the "ar" file format.
     /// @brief Get the permission mode associated with this archive member.
-    unsigned getMode() const             { return info.mode; }
+    unsigned getMode() const             { return info.getMode(); }
 
     /// This method returns the time at which the archive member was last
     /// modified when it was not in the archive.
     /// @brief Get the time of last modification of the archive member.
-    sys::TimeValue getModTime() const    { return info.modTime; }
+    sys::TimeValue getModTime() const    { return info.getTimestamp(); }
 
     /// @returns the size of the archive member in bytes.
     /// @brief Get the size of the archive member.
-    unsigned getSize() const             { return info.fileSize; }
+    unsigned getSize() const             { return info.getSize(); }
 
     /// This method returns the total size of the archive member as it
     /// appears on disk. This includes the file content, the header, the
@@ -162,14 +161,14 @@
     /// systems.
     /// @returns the status info for the archive member
     /// @brief Obtain the status info for the archive member
-    const sys::Path::StatusInfo& getStatusInfo() const { return info; }
+    const sys::FileStatus &getFileStatus() const { return info; }
 
     /// This method causes the archive member to be replaced with the contents
     /// of the file specified by \p File. The contents of \p this will be
     /// updated to reflect the new data from \p File. The \p File must exist and
     /// be readable on entry to this method.
     /// @brief Replace contents of archive member with a new file.
-    void replaceWith(const sys::Path& aFile);
+    void replaceWith(const sys::Path &aFile);
 
   /// @}
   /// @name ilist methods - do not use
@@ -190,7 +189,7 @@
     ArchiveMember* prev;        ///< Pointer to previous archive member
     Archive*       parent;      ///< Pointer to parent archive
     sys::Path      path;        ///< Path of file containing the member
-    sys::Path::StatusInfo info; ///< Status info (size,mode,date)
+    sys::FileStatus info;       ///< Status info (size,mode,date)
     unsigned       flags;       ///< Flags about the archive member
     const void*    data;        ///< Data for the member
 
@@ -205,7 +204,7 @@
   private:
     /// Used internally by the Archive class to construct an ArchiveMember.
     /// The contents of the ArchiveMember are filled out by the Archive class.
-    ArchiveMember( Archive* PAR );
+    ArchiveMember(Archive *PAR);
 
     // So Archive can construct an ArchiveMember
     friend class llvm::Archive;






More information about the llvm-commits mailing list