R600: Add ISA documents to the CompilerWriterInfo page
[oota-llvm.git] / tools / llvm-ar / Archive.h
index 33a12c0c90a6f8fefbf255d7f39292bcc06a7c30..52622dde3510a8368ba5b32f8aaf8c0814fab088 100644 (file)
@@ -20,6 +20,7 @@
 #include "llvm/ADT/ilist.h"
 #include "llvm/ADT/ilist_node.h"
 #include "llvm/Support/Path.h"
+#include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/TimeValue.h"
 #include <map>
 #include <set>
@@ -51,10 +52,8 @@ class ArchiveMember : public ilist_node<ArchiveMember> {
     enum Flags {
       SVR4SymbolTableFlag = 1,     ///< Member is a SVR4 symbol table
       BSD4SymbolTableFlag = 2,     ///< Member is a BSD4 symbol table
-      BitcodeFlag         = 4,     ///< Member is bitcode
-      HasPathFlag         = 8,     ///< Member has a full or partial path
-      HasLongFilenameFlag = 16,    ///< Member uses the long filename syntax
-      StringTableFlag     = 32     ///< Member is an ar(1) format string table
+      HasLongFilenameFlag = 8,     ///< Member uses the long filename syntax
+      StringTableFlag     = 16     ///< Member is an ar(1) format string table
     };
 
   /// @}
@@ -121,14 +120,6 @@ class ArchiveMember : public ilist_node<ArchiveMember> {
     /// @brief Determine if this member is the ar(1) string table.
     bool isStringTable() const { return flags&StringTableFlag; }
 
-    /// @returns true iff the archive member is a bitcode file.
-    /// @brief Determine if this member is a bitcode file.
-    bool isBitcode() const { return flags&BitcodeFlag; }
-
-    /// @returns true iff the file name contains a path (directory) component.
-    /// @brief Determine if the member has a path
-    bool hasPath() const { return flags&HasPathFlag; }
-
     /// Long filenames are an artifact of the ar(1) file format which allows
     /// up to sixteen characters in its header and doesn't allow a path
     /// separator character (/). To avoid this, a "long format" member name is
@@ -301,20 +292,6 @@ class Archive {
     /// @brief Get the iplist of the members
     MembersList& getMembers() { return members; }
 
-    /// This method allows direct query of the Archive's symbol table. The
-    /// symbol table is a std::map of std::string (the symbol) to unsigned (the
-    /// file offset). Note that for efficiency reasons, the offset stored in
-    /// the symbol table is not the actual offset. It is the offset from the
-    /// beginning of the first "real" file member (after the symbol table). Use
-    /// the getFirstFileOffset() to obtain that offset and add this value to the
-    /// offset in the symbol table to obtain the real file offset. Note that
-    /// there is purposefully no interface provided by Archive to look up
-    /// members by their offset. Use the findModulesDefiningSymbols and
-    /// findModuleDefiningSymbol methods instead.
-    /// @returns the Archive's symbol table.
-    /// @brief Get the archive's symbol table
-    const SymTabType& getSymbolTable() { return symTab; }
-
     /// This method returns the offset in the archive file to the first "real"
     /// file member. Archive files, on disk, have a signature and might have a
     /// symbol table that precedes the first actual file member. This method
@@ -341,8 +318,6 @@ class Archive {
     /// returns false if the writing succeeded.
     /// @brief Write (possibly modified) archive contents to disk
     bool writeToDisk(
-      bool CreateSymbolTable=false,   ///< Create Symbol table
-      bool TruncateNames=false,       ///< Truncate the filename to 15 chars
       std::string* ErrMessage=0       ///< If non-null, where error msg is set
     );
 
@@ -395,15 +370,13 @@ class Archive {
     /// returns true if writing member failed, \p error set to error message.
     bool writeMember(
       const ArchiveMember& member, ///< The member to be written
-      std::ofstream& ARFile,       ///< The file to write member onto
-      bool CreateSymbolTable,      ///< Should symbol table be created?
-      bool TruncateNames,          ///< Should names be truncated to 11 chars?
+      raw_fd_ostream& ARFile,      ///< The file to write member onto
       std::string* ErrMessage      ///< If non-null, place were error msg is set
     );
 
     /// @brief Fill in an ArchiveMemberHeader from ArchiveMember.
     bool fillHeader(const ArchiveMember&mbr,
-                    ArchiveMemberHeader& hdr,int sz, bool TruncateNames) const;
+                    ArchiveMemberHeader& hdr,int sz) const;
 
     /// @brief Maps archive into memory
     bool mapToMemory(std::string* ErrMsg);
@@ -427,12 +400,9 @@ class Archive {
     MembersList members;      ///< The ilist of ArchiveMember
     MemoryBuffer *mapfile;    ///< Raw Archive contents mapped into memory
     const char* base;         ///< Base of the memory mapped file data
-    SymTabType symTab;        ///< The symbol table
     std::string strtab;       ///< The string table for long file names
-    unsigned symTabSize;      ///< Size in bytes of symbol table
     unsigned firstFileOffset; ///< Offset to first normal file.
     ModuleMap modules;        ///< The modules loaded via symbol lookup.
-    ArchiveMember* foreignST; ///< This holds the foreign symbol table.
     LLVMContext& Context;     ///< This holds global data.
   /// @}
   /// @name Hidden