LLVM API Documentation
00001 //===-- llvm/Bitcode/Archive.h - LLVM Bitcode Archive -----------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This header file declares the Archive and ArchiveMember classes that provide 00011 // manipulation of LLVM Archive files. The implementation is provided by the 00012 // lib/Bitcode/Archive library. This library is used to read and write 00013 // archive (*.a) files that contain LLVM bitcode files (or others). 00014 // 00015 //===----------------------------------------------------------------------===// 00016 00017 #ifndef LLVM_BITCODE_ARCHIVE_H 00018 #define LLVM_BITCODE_ARCHIVE_H 00019 00020 #include "llvm/ADT/ilist.h" 00021 #include "llvm/ADT/ilist_node.h" 00022 #include "llvm/System/Path.h" 00023 #include <map> 00024 #include <set> 00025 #include <fstream> 00026 00027 namespace llvm { 00028 class MemoryBuffer; 00029 00030 // Forward declare classes 00031 class ModuleProvider; // From VMCore 00032 class Module; // From VMCore 00033 class Archive; // Declared below 00034 class ArchiveMemberHeader; // Internal implementation class 00035 class LLVMContext; // Global data 00036 00037 /// This class is the main class manipulated by users of the Archive class. It 00038 /// holds information about one member of the Archive. It is also the element 00039 /// stored by the Archive's ilist, the Archive's main abstraction. Because of 00040 /// the special requirements of archive files, users are not permitted to 00041 /// construct ArchiveMember instances. You should obtain them from the methods 00042 /// of the Archive class instead. 00043 /// @brief This class represents a single archive member. 00044 class ArchiveMember : public ilist_node<ArchiveMember> { 00045 /// @name Types 00046 /// @{ 00047 public: 00048 /// These flags are used internally by the archive member to specify various 00049 /// characteristics of the member. The various "is" methods below provide 00050 /// access to the flags. The flags are not user settable. 00051 enum Flags { 00052 CompressedFlag = 1, ///< Member is a normal compressed file 00053 SVR4SymbolTableFlag = 2, ///< Member is a SVR4 symbol table 00054 BSD4SymbolTableFlag = 4, ///< Member is a BSD4 symbol table 00055 LLVMSymbolTableFlag = 8, ///< Member is an LLVM symbol table 00056 BitcodeFlag = 16, ///< Member is bitcode 00057 HasPathFlag = 64, ///< Member has a full or partial path 00058 HasLongFilenameFlag = 128, ///< Member uses the long filename syntax 00059 StringTableFlag = 256 ///< Member is an ar(1) format string table 00060 }; 00061 00062 /// @} 00063 /// @name Accessors 00064 /// @{ 00065 public: 00066 /// @returns the parent Archive instance 00067 /// @brief Get the archive associated with this member 00068 Archive* getArchive() const { return parent; } 00069 00070 /// @returns the path to the Archive's file 00071 /// @brief Get the path to the archive member 00072 const sys::Path& getPath() const { return path; } 00073 00074 /// The "user" is the owner of the file per Unix security. This may not 00075 /// have any applicability on non-Unix systems but is a required component 00076 /// of the "ar" file format. 00077 /// @brief Get the user associated with this archive member. 00078 unsigned getUser() const { return info.getUser(); } 00079 00080 /// The "group" is the owning group of the file per Unix security. This 00081 /// may not have any applicability on non-Unix systems but is a required 00082 /// component of the "ar" file format. 00083 /// @brief Get the group associated with this archive member. 00084 unsigned getGroup() const { return info.getGroup(); } 00085 00086 /// The "mode" specifies the access permissions for the file per Unix 00087 /// security. This may not have any applicabiity on non-Unix systems but is 00088 /// a required component of the "ar" file format. 00089 /// @brief Get the permission mode associated with this archive member. 00090 unsigned getMode() const { return info.getMode(); } 00091 00092 /// This method returns the time at which the archive member was last 00093 /// modified when it was not in the archive. 00094 /// @brief Get the time of last modification of the archive member. 00095 sys::TimeValue getModTime() const { return info.getTimestamp(); } 00096 00097 /// @returns the size of the archive member in bytes. 00098 /// @brief Get the size of the archive member. 00099 uint64_t getSize() const { return info.getSize(); } 00100 00101 /// This method returns the total size of the archive member as it 00102 /// appears on disk. This includes the file content, the header, the 00103 /// long file name if any, and the padding. 00104 /// @brief Get total on-disk member size. 00105 unsigned getMemberSize() const; 00106 00107 /// This method will return a pointer to the in-memory content of the 00108 /// archive member, if it is available. If the data has not been loaded 00109 /// into memory, the return value will be null. 00110 /// @returns a pointer to the member's data. 00111 /// @brief Get the data content of the archive member 00112 const void* getData() const { return data; } 00113 00114 /// This method determines if the member is a regular compressed file. 00115 /// @returns true iff the archive member is a compressed regular file. 00116 /// @brief Determine if the member is a compressed regular file. 00117 bool isCompressed() const { return flags&CompressedFlag; } 00118 00119 /// @returns true iff the member is a SVR4 (non-LLVM) symbol table 00120 /// @brief Determine if this member is a SVR4 symbol table. 00121 bool isSVR4SymbolTable() const { return flags&SVR4SymbolTableFlag; } 00122 00123 /// @returns true iff the member is a BSD4.4 (non-LLVM) symbol table 00124 /// @brief Determine if this member is a BSD4.4 symbol table. 00125 bool isBSD4SymbolTable() const { return flags&BSD4SymbolTableFlag; } 00126 00127 /// @returns true iff the archive member is the LLVM symbol table 00128 /// @brief Determine if this member is the LLVM symbol table. 00129 bool isLLVMSymbolTable() const { return flags&LLVMSymbolTableFlag; } 00130 00131 /// @returns true iff the archive member is the ar(1) string table 00132 /// @brief Determine if this member is the ar(1) string table. 00133 bool isStringTable() const { return flags&StringTableFlag; } 00134 00135 /// @returns true iff the archive member is a bitcode file. 00136 /// @brief Determine if this member is a bitcode file. 00137 bool isBitcode() const { return flags&BitcodeFlag; } 00138 00139 /// @returns true iff the file name contains a path (directory) component. 00140 /// @brief Determine if the member has a path 00141 bool hasPath() const { return flags&HasPathFlag; } 00142 00143 /// Long filenames are an artifact of the ar(1) file format which allows 00144 /// up to sixteen characters in its header and doesn't allow a path 00145 /// separator character (/). To avoid this, a "long format" member name is 00146 /// allowed that doesn't have this restriction. This method determines if 00147 /// that "long format" is used for this member. 00148 /// @returns true iff the file name uses the long form 00149 /// @brief Determin if the member has a long file name 00150 bool hasLongFilename() const { return flags&HasLongFilenameFlag; } 00151 00152 /// This method returns the status info (like Unix stat(2)) for the archive 00153 /// member. The status info provides the file's size, permissions, and 00154 /// modification time. The contents of the Path::StatusInfo structure, other 00155 /// than the size and modification time, may not have utility on non-Unix 00156 /// systems. 00157 /// @returns the status info for the archive member 00158 /// @brief Obtain the status info for the archive member 00159 const sys::FileStatus &getFileStatus() const { return info; } 00160 00161 /// This method causes the archive member to be replaced with the contents 00162 /// of the file specified by \p File. The contents of \p this will be 00163 /// updated to reflect the new data from \p File. The \p File must exist and 00164 /// be readable on entry to this method. 00165 /// @returns true if an error occurred, false otherwise 00166 /// @brief Replace contents of archive member with a new file. 00167 bool replaceWith(const sys::Path &aFile, std::string* ErrMsg); 00168 00169 /// @} 00170 /// @name Data 00171 /// @{ 00172 private: 00173 Archive* parent; ///< Pointer to parent archive 00174 sys::PathWithStatus path; ///< Path of file containing the member 00175 sys::FileStatus info; ///< Status info (size,mode,date) 00176 unsigned flags; ///< Flags about the archive member 00177 const void* data; ///< Data for the member 00178 00179 /// @} 00180 /// @name Constructors 00181 /// @{ 00182 public: 00183 /// The default constructor is only used by the Archive's iplist when it 00184 /// constructs the list's sentry node. 00185 ArchiveMember(); 00186 00187 private: 00188 /// Used internally by the Archive class to construct an ArchiveMember. 00189 /// The contents of the ArchiveMember are filled out by the Archive class. 00190 explicit ArchiveMember(Archive *PAR); 00191 00192 // So Archive can construct an ArchiveMember 00193 friend class llvm::Archive; 00194 /// @} 00195 }; 00196 00197 /// This class defines the interface to LLVM Archive files. The Archive class 00198 /// presents the archive file as an ilist of ArchiveMember objects. The members 00199 /// can be rearranged in any fashion either by directly editing the ilist or by 00200 /// using editing methods on the Archive class (recommended). The Archive 00201 /// class also provides several ways of accessing the archive file for various 00202 /// purposes such as editing and linking. Full symbol table support is provided 00203 /// for loading only those files that resolve symbols. Note that read 00204 /// performance of this library is _crucial_ for performance of JIT type 00205 /// applications and the linkers. Consequently, the implementation of the class 00206 /// is optimized for reading. 00207 class Archive { 00208 00209 /// @name Types 00210 /// @{ 00211 public: 00212 /// This is the ilist type over which users may iterate to examine 00213 /// the contents of the archive 00214 /// @brief The ilist type of ArchiveMembers that Archive contains. 00215 typedef iplist<ArchiveMember> MembersList; 00216 00217 /// @brief Forward mutable iterator over ArchiveMember 00218 typedef MembersList::iterator iterator; 00219 00220 /// @brief Forward immutable iterator over ArchiveMember 00221 typedef MembersList::const_iterator const_iterator; 00222 00223 /// @brief Reverse mutable iterator over ArchiveMember 00224 typedef std::reverse_iterator<iterator> reverse_iterator; 00225 00226 /// @brief Reverse immutable iterator over ArchiveMember 00227 typedef std::reverse_iterator<const_iterator> const_reverse_iterator; 00228 00229 /// @brief The in-memory version of the symbol table 00230 typedef std::map<std::string,unsigned> SymTabType; 00231 00232 /// @} 00233 /// @name ilist accessor methods 00234 /// @{ 00235 public: 00236 inline iterator begin() { return members.begin(); } 00237 inline const_iterator begin() const { return members.begin(); } 00238 inline iterator end () { return members.end(); } 00239 inline const_iterator end () const { return members.end(); } 00240 00241 inline reverse_iterator rbegin() { return members.rbegin(); } 00242 inline const_reverse_iterator rbegin() const { return members.rbegin(); } 00243 inline reverse_iterator rend () { return members.rend(); } 00244 inline const_reverse_iterator rend () const { return members.rend(); } 00245 00246 inline size_t size() const { return members.size(); } 00247 inline bool empty() const { return members.empty(); } 00248 inline const ArchiveMember& front() const { return members.front(); } 00249 inline ArchiveMember& front() { return members.front(); } 00250 inline const ArchiveMember& back() const { return members.back(); } 00251 inline ArchiveMember& back() { return members.back(); } 00252 00253 /// @} 00254 /// @name ilist mutator methods 00255 /// @{ 00256 public: 00257 /// This method splices a \p src member from an archive (possibly \p this), 00258 /// to a position just before the member given by \p dest in \p this. When 00259 /// the archive is written, \p src will be written in its new location. 00260 /// @brief Move a member to a new location 00261 inline void splice(iterator dest, Archive& arch, iterator src) 00262 { return members.splice(dest,arch.members,src); } 00263 00264 /// This method erases a \p target member from the archive. When the 00265 /// archive is written, it will no longer contain \p target. The associated 00266 /// ArchiveMember is deleted. 00267 /// @brief Erase a member. 00268 inline iterator erase(iterator target) { return members.erase(target); } 00269 00270 /// @} 00271 /// @name Constructors 00272 /// @{ 00273 public: 00274 /// Create an empty archive file and associate it with the \p Filename. This 00275 /// method does not actually create the archive disk file. It creates an 00276 /// empty Archive object. If the writeToDisk method is called, the archive 00277 /// file \p Filename will be created at that point, with whatever content 00278 /// the returned Archive object has at that time. 00279 /// @returns An Archive* that represents the new archive file. 00280 /// @brief Create an empty Archive. 00281 static Archive* CreateEmpty( 00282 const sys::Path& Filename,///< Name of the archive to (eventually) create. 00283 LLVMContext& C ///< Context to use for global information 00284 ); 00285 00286 /// Open an existing archive and load its contents in preparation for 00287 /// editing. After this call, the member ilist is completely populated based 00288 /// on the contents of the archive file. You should use this form of open if 00289 /// you intend to modify the archive or traverse its contents (e.g. for 00290 /// printing). 00291 /// @brief Open and load an archive file 00292 static Archive* OpenAndLoad( 00293 const sys::Path& filePath, ///< The file path to open and load 00294 LLVMContext& C, ///< The context to use for global information 00295 std::string* ErrorMessage ///< An optional error string 00296 ); 00297 00298 /// This method opens an existing archive file from \p Filename and reads in 00299 /// its symbol table without reading in any of the archive's members. This 00300 /// reduces both I/O and cpu time in opening the archive if it is to be used 00301 /// solely for symbol lookup (e.g. during linking). The \p Filename must 00302 /// exist and be an archive file or an exception will be thrown. This form 00303 /// of opening the archive is intended for read-only operations that need to 00304 /// locate members via the symbol table for link editing. Since the archve 00305 /// members are not read by this method, the archive will appear empty upon 00306 /// return. If editing operations are performed on the archive, they will 00307 /// completely replace the contents of the archive! It is recommended that 00308 /// if this form of opening the archive is used that only the symbol table 00309 /// lookup methods (getSymbolTable, findModuleDefiningSymbol, and 00310 /// findModulesDefiningSymbols) be used. 00311 /// @throws std::string if an error occurs opening the file 00312 /// @returns an Archive* that represents the archive file. 00313 /// @brief Open an existing archive and load its symbols. 00314 static Archive* OpenAndLoadSymbols( 00315 const sys::Path& Filename, ///< Name of the archive file to open 00316 LLVMContext& C, ///< The context to use for global info 00317 std::string* ErrorMessage=0 ///< An optional error string 00318 ); 00319 00320 /// This destructor cleans up the Archive object, releases all memory, and 00321 /// closes files. It does nothing with the archive file on disk. If you 00322 /// haven't used the writeToDisk method by the time the destructor is 00323 /// called, all changes to the archive will be lost. 00324 /// @throws std::string if an error occurs 00325 /// @brief Destruct in-memory archive 00326 ~Archive(); 00327 00328 /// @} 00329 /// @name Accessors 00330 /// @{ 00331 public: 00332 /// @returns the path to the archive file. 00333 /// @brief Get the archive path. 00334 const sys::Path& getPath() { return archPath; } 00335 00336 /// This method is provided so that editing methods can be invoked directly 00337 /// on the Archive's iplist of ArchiveMember. However, it is recommended 00338 /// that the usual STL style iterator interface be used instead. 00339 /// @returns the iplist of ArchiveMember 00340 /// @brief Get the iplist of the members 00341 MembersList& getMembers() { return members; } 00342 00343 /// This method allows direct query of the Archive's symbol table. The 00344 /// symbol table is a std::map of std::string (the symbol) to unsigned (the 00345 /// file offset). Note that for efficiency reasons, the offset stored in 00346 /// the symbol table is not the actual offset. It is the offset from the 00347 /// beginning of the first "real" file member (after the symbol table). Use 00348 /// the getFirstFileOffset() to obtain that offset and add this value to the 00349 /// offset in the symbol table to obtain the real file offset. Note that 00350 /// there is purposefully no interface provided by Archive to look up 00351 /// members by their offset. Use the findModulesDefiningSymbols and 00352 /// findModuleDefiningSymbol methods instead. 00353 /// @returns the Archive's symbol table. 00354 /// @brief Get the archive's symbol table 00355 const SymTabType& getSymbolTable() { return symTab; } 00356 00357 /// This method returns the offset in the archive file to the first "real" 00358 /// file member. Archive files, on disk, have a signature and might have a 00359 /// symbol table that precedes the first actual file member. This method 00360 /// allows you to determine what the size of those fields are. 00361 /// @returns the offset to the first "real" file member in the archive. 00362 /// @brief Get the offset to the first "real" file member in the archive. 00363 unsigned getFirstFileOffset() { return firstFileOffset; } 00364 00365 /// This method will scan the archive for bitcode modules, interpret them 00366 /// and return a vector of the instantiated modules in \p Modules. If an 00367 /// error occurs, this method will return true. If \p ErrMessage is not null 00368 /// and an error occurs, \p *ErrMessage will be set to a string explaining 00369 /// the error that occurred. 00370 /// @returns true if an error occurred 00371 /// @brief Instantiate all the bitcode modules located in the archive 00372 bool getAllModules(std::vector<Module*>& Modules, std::string* ErrMessage); 00373 00374 /// This accessor looks up the \p symbol in the archive's symbol table and 00375 /// returns the associated module that defines that symbol. This method can 00376 /// be called as many times as necessary. This is handy for linking the 00377 /// archive into another module based on unresolved symbols. Note that the 00378 /// ModuleProvider returned by this accessor should not be deleted by the 00379 /// caller. It is managed internally by the Archive class. It is possible 00380 /// that multiple calls to this accessor will return the same ModuleProvider 00381 /// instance because the associated module defines multiple symbols. 00382 /// @returns The ModuleProvider* found or null if the archive does not 00383 /// contain a module that defines the \p symbol. 00384 /// @brief Look up a module by symbol name. 00385 ModuleProvider* findModuleDefiningSymbol( 00386 const std::string& symbol, ///< Symbol to be sought 00387 std::string* ErrMessage ///< Error message storage, if non-zero 00388 ); 00389 00390 /// This method is similar to findModuleDefiningSymbol but allows lookup of 00391 /// more than one symbol at a time. If \p symbols contains a list of 00392 /// undefined symbols in some module, then calling this method is like 00393 /// making one complete pass through the archive to resolve symbols but is 00394 /// more efficient than looking at the individual members. Note that on 00395 /// exit, the symbols resolved by this method will be removed from \p 00396 /// symbols to ensure they are not re-searched on a subsequent call. If 00397 /// you need to retain the list of symbols, make a copy. 00398 /// @brief Look up multiple symbols in the archive. 00399 bool findModulesDefiningSymbols( 00400 std::set<std::string>& symbols, ///< Symbols to be sought 00401 std::set<ModuleProvider*>& modules, ///< The modules matching \p symbols 00402 std::string* ErrMessage ///< Error msg storage, if non-zero 00403 ); 00404 00405 /// This method determines whether the archive is a properly formed llvm 00406 /// bitcode archive. It first makes sure the symbol table has been loaded 00407 /// and has a non-zero size. If it does, then it is an archive. If not, 00408 /// then it tries to load all the bitcode modules of the archive. Finally, 00409 /// it returns whether it was successfull. 00410 /// @returns true if the archive is a proper llvm bitcode archive 00411 /// @brief Determine whether the archive is a proper llvm bitcode archive. 00412 bool isBitcodeArchive(); 00413 00414 /// @} 00415 /// @name Mutators 00416 /// @{ 00417 public: 00418 /// This method is the only way to get the archive written to disk. It 00419 /// creates or overwrites the file specified when \p this was created 00420 /// or opened. The arguments provide options for writing the archive. If 00421 /// \p CreateSymbolTable is true, the archive is scanned for bitcode files 00422 /// and a symbol table of the externally visible function and global 00423 /// variable names is created. If \p TruncateNames is true, the names of the 00424 /// archive members will have their path component stripped and the file 00425 /// name will be truncated at 15 characters. If \p Compress is specified, 00426 /// all archive members will be compressed before being written. If 00427 /// \p PrintSymTab is true, the symbol table will be printed to std::cout. 00428 /// @returns true if an error occurred, \p error set to error message 00429 /// @returns false if the writing succeeded. 00430 /// @brief Write (possibly modified) archive contents to disk 00431 bool writeToDisk( 00432 bool CreateSymbolTable=false, ///< Create Symbol table 00433 bool TruncateNames=false, ///< Truncate the filename to 15 chars 00434 bool Compress=false, ///< Compress files 00435 std::string* ErrMessage=0 ///< If non-null, where error msg is set 00436 ); 00437 00438 /// This method adds a new file to the archive. The \p filename is examined 00439 /// to determine just enough information to create an ArchiveMember object 00440 /// which is then inserted into the Archive object's ilist at the location 00441 /// given by \p where. 00442 /// @returns true if an error occured, false otherwise 00443 /// @brief Add a file to the archive. 00444 bool addFileBefore( 00445 const sys::Path& filename, ///< The file to be added 00446 iterator where, ///< Insertion point 00447 std::string* ErrMsg ///< Optional error message location 00448 ); 00449 00450 /// @} 00451 /// @name Implementation 00452 /// @{ 00453 protected: 00454 /// @brief Construct an Archive for \p filename and optionally map it 00455 /// into memory. 00456 explicit Archive(const sys::Path& filename, LLVMContext& C); 00457 00458 /// @param data The symbol table data to be parsed 00459 /// @param len The length of the symbol table data 00460 /// @param error Set to address of a std::string to get error messages 00461 /// @returns false on error 00462 /// @brief Parse the symbol table at \p data. 00463 bool parseSymbolTable(const void* data,unsigned len,std::string* error); 00464 00465 /// @returns A fully populated ArchiveMember or 0 if an error occurred. 00466 /// @brief Parse the header of a member starting at \p At 00467 ArchiveMember* parseMemberHeader( 00468 const char*&At, ///< The pointer to the location we're parsing 00469 const char*End, ///< The pointer to the end of the archive 00470 std::string* error ///< Optional error message catcher 00471 ); 00472 00473 /// @param ErrMessage Set to address of a std::string to get error messages 00474 /// @returns false on error 00475 /// @brief Check that the archive signature is correct 00476 bool checkSignature(std::string* ErrMessage); 00477 00478 /// @param ErrMessage Set to address of a std::string to get error messages 00479 /// @returns false on error 00480 /// @brief Load the entire archive. 00481 bool loadArchive(std::string* ErrMessage); 00482 00483 /// @param ErrMessage Set to address of a std::string to get error messages 00484 /// @returns false on error 00485 /// @brief Load just the symbol table. 00486 bool loadSymbolTable(std::string* ErrMessage); 00487 00488 /// @brief Write the symbol table to an ofstream. 00489 void writeSymbolTable(std::ofstream& ARFile); 00490 00491 /// Writes one ArchiveMember to an ofstream. If an error occurs, returns 00492 /// false, otherwise true. If an error occurs and error is non-null then 00493 /// it will be set to an error message. 00494 /// @returns false Writing member succeeded 00495 /// @returns true Writing member failed, \p error set to error message 00496 bool writeMember( 00497 const ArchiveMember& member, ///< The member to be written 00498 std::ofstream& ARFile, ///< The file to write member onto 00499 bool CreateSymbolTable, ///< Should symbol table be created? 00500 bool TruncateNames, ///< Should names be truncated to 11 chars? 00501 bool ShouldCompress, ///< Should the member be compressed? 00502 std::string* ErrMessage ///< If non-null, place were error msg is set 00503 ); 00504 00505 /// @brief Fill in an ArchiveMemberHeader from ArchiveMember. 00506 bool fillHeader(const ArchiveMember&mbr, 00507 ArchiveMemberHeader& hdr,int sz, bool TruncateNames) const; 00508 00509 /// @brief Maps archive into memory 00510 bool mapToMemory(std::string* ErrMsg); 00511 00512 /// @brief Frees all the members and unmaps the archive file. 00513 void cleanUpMemory(); 00514 00515 /// This type is used to keep track of bitcode modules loaded from the 00516 /// symbol table. It maps the file offset to a pair that consists of the 00517 /// associated ArchiveMember and the ModuleProvider. 00518 /// @brief Module mapping type 00519 typedef std::map<unsigned,std::pair<ModuleProvider*,ArchiveMember*> > 00520 ModuleMap; 00521 00522 00523 /// @} 00524 /// @name Data 00525 /// @{ 00526 protected: 00527 sys::Path archPath; ///< Path to the archive file we read/write 00528 MembersList members; ///< The ilist of ArchiveMember 00529 MemoryBuffer *mapfile; ///< Raw Archive contents mapped into memory 00530 const char* base; ///< Base of the memory mapped file data 00531 SymTabType symTab; ///< The symbol table 00532 std::string strtab; ///< The string table for long file names 00533 unsigned symTabSize; ///< Size in bytes of symbol table 00534 unsigned firstFileOffset; ///< Offset to first normal file. 00535 ModuleMap modules; ///< The modules loaded via symbol lookup. 00536 ArchiveMember* foreignST; ///< This holds the foreign symbol table. 00537 LLVMContext& Context; ///< This holds global data. 00538 /// @} 00539 /// @name Hidden 00540 /// @{ 00541 private: 00542 Archive(); ///< Do not implement 00543 Archive(const Archive&); ///< Do not implement 00544 Archive& operator=(const Archive&); ///< Do not implement 00545 /// @} 00546 }; 00547 00548 } // End llvm namespace 00549 00550 #endif