blob: 3922e375ae303cdc2eb1e57a733cedb1182b8e9e [file] [log] [blame]
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +00001//===-- llvm/Bitcode/Archive.h - LLVM Bitcode Archive -----------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattnere9cc7422007-12-29 19:59:42 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This header file declares the Archive and ArchiveMember classes that provide
11// manipulation of LLVM Archive files. The implementation is provided by the
12// lib/Bitcode/Archive library. This library is used to read and write
13// archive (*.a) files that contain LLVM bitcode files (or others).
14//
15//===----------------------------------------------------------------------===//
16
Rafael Espindolaac5c1b02013-06-17 15:47:20 +000017#ifndef TOOLS_LLVM_AR_ARCHIVE_H
18#define TOOLS_LLVM_AR_ARCHIVE_H
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000019
Anton Korobeynikovcf3acae2008-05-29 17:41:17 +000020#include "llvm/ADT/ilist.h"
Dan Gohman804c95d2008-07-28 21:51:04 +000021#include "llvm/ADT/ilist_node.h"
Michael J. Spencer447762d2010-11-29 18:16:10 +000022#include "llvm/Support/Path.h"
Rafael Espindolae88d90a2013-06-21 22:11:36 +000023#include "llvm/Support/raw_ostream.h"
Rafael Espindolafca03892013-06-19 21:13:59 +000024#include "llvm/Support/TimeValue.h"
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000025#include <map>
26#include <set>
Rafael Espindola38e6b862013-06-19 21:21:43 +000027#include <vector>
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000028
29namespace llvm {
Chris Lattnerd4310a22008-04-01 04:26:46 +000030 class MemoryBuffer;
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000031
32// Forward declare classes
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000033class Module; // From VMCore
34class Archive; // Declared below
35class ArchiveMemberHeader; // Internal implementation class
Benjamin Kramer78c3bcb2009-08-11 17:45:13 +000036class LLVMContext; // Global data
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000037
38/// This class is the main class manipulated by users of the Archive class. It
39/// holds information about one member of the Archive. It is also the element
40/// stored by the Archive's ilist, the Archive's main abstraction. Because of
41/// the special requirements of archive files, users are not permitted to
42/// construct ArchiveMember instances. You should obtain them from the methods
43/// of the Archive class instead.
44/// @brief This class represents a single archive member.
Dan Gohman804c95d2008-07-28 21:51:04 +000045class ArchiveMember : public ilist_node<ArchiveMember> {
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000046 /// @name Types
47 /// @{
48 public:
49 /// These flags are used internally by the archive member to specify various
50 /// characteristics of the member. The various "is" methods below provide
51 /// access to the flags. The flags are not user settable.
52 enum Flags {
Rafael Espindola740a6bc2012-08-10 01:57:52 +000053 SVR4SymbolTableFlag = 1, ///< Member is a SVR4 symbol table
54 BSD4SymbolTableFlag = 2, ///< Member is a BSD4 symbol table
Rafael Espindola668c6422013-06-14 23:25:53 +000055 BitcodeFlag = 4, ///< Member is bitcode
Rafael Espindola789c1292013-06-20 13:41:51 +000056 HasLongFilenameFlag = 8, ///< Member uses the long filename syntax
57 StringTableFlag = 16 ///< Member is an ar(1) format string table
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000058 };
59
60 /// @}
61 /// @name Accessors
62 /// @{
63 public:
64 /// @returns the parent Archive instance
65 /// @brief Get the archive associated with this member
66 Archive* getArchive() const { return parent; }
67
68 /// @returns the path to the Archive's file
69 /// @brief Get the path to the archive member
Rafael Espindola8417a782013-06-19 15:45:37 +000070 StringRef getPath() const { return path; }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000071
72 /// The "user" is the owner of the file per Unix security. This may not
73 /// have any applicability on non-Unix systems but is a required component
74 /// of the "ar" file format.
75 /// @brief Get the user associated with this archive member.
Rafael Espindolafca03892013-06-19 21:13:59 +000076 unsigned getUser() const { return User; }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000077
78 /// The "group" is the owning group of the file per Unix security. This
79 /// may not have any applicability on non-Unix systems but is a required
80 /// component of the "ar" file format.
81 /// @brief Get the group associated with this archive member.
Rafael Espindolafca03892013-06-19 21:13:59 +000082 unsigned getGroup() const { return Group; }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000083
84 /// The "mode" specifies the access permissions for the file per Unix
Michael J. Spencer53dcdc72011-01-15 21:43:45 +000085 /// security. This may not have any applicability on non-Unix systems but is
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000086 /// a required component of the "ar" file format.
87 /// @brief Get the permission mode associated with this archive member.
Rafael Espindolafca03892013-06-19 21:13:59 +000088 unsigned getMode() const { return Mode; }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000089
90 /// This method returns the time at which the archive member was last
91 /// modified when it was not in the archive.
92 /// @brief Get the time of last modification of the archive member.
Rafael Espindolafca03892013-06-19 21:13:59 +000093 sys::TimeValue getModTime() const { return ModTime; }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000094
95 /// @returns the size of the archive member in bytes.
96 /// @brief Get the size of the archive member.
Rafael Espindolafca03892013-06-19 21:13:59 +000097 uint64_t getSize() const { return Size; }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +000098
99 /// This method returns the total size of the archive member as it
100 /// appears on disk. This includes the file content, the header, the
101 /// long file name if any, and the padding.
102 /// @brief Get total on-disk member size.
103 unsigned getMemberSize() const;
104
105 /// This method will return a pointer to the in-memory content of the
106 /// archive member, if it is available. If the data has not been loaded
107 /// into memory, the return value will be null.
108 /// @returns a pointer to the member's data.
109 /// @brief Get the data content of the archive member
Benjamin Kramer3576b742010-04-19 16:15:31 +0000110 const char* getData() const { return data; }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000111
Sylvestre Ledru91ce36c2012-09-27 10:14:43 +0000112 /// @returns true iff the member is a SVR4 (non-LLVM) symbol table
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000113 /// @brief Determine if this member is a SVR4 symbol table.
114 bool isSVR4SymbolTable() const { return flags&SVR4SymbolTableFlag; }
115
Sylvestre Ledru91ce36c2012-09-27 10:14:43 +0000116 /// @returns true iff the member is a BSD4.4 (non-LLVM) symbol table
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000117 /// @brief Determine if this member is a BSD4.4 symbol table.
118 bool isBSD4SymbolTable() const { return flags&BSD4SymbolTableFlag; }
119
Sylvestre Ledru91ce36c2012-09-27 10:14:43 +0000120 /// @returns true iff the archive member is the ar(1) string table
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000121 /// @brief Determine if this member is the ar(1) string table.
122 bool isStringTable() const { return flags&StringTableFlag; }
123
Sylvestre Ledru91ce36c2012-09-27 10:14:43 +0000124 /// @returns true iff the archive member is a bitcode file.
Gabor Greif24027b52007-07-06 20:28:40 +0000125 /// @brief Determine if this member is a bitcode file.
Gabor Greif3d3fc322007-07-06 13:38:17 +0000126 bool isBitcode() const { return flags&BitcodeFlag; }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000127
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000128 /// Long filenames are an artifact of the ar(1) file format which allows
129 /// up to sixteen characters in its header and doesn't allow a path
130 /// separator character (/). To avoid this, a "long format" member name is
131 /// allowed that doesn't have this restriction. This method determines if
132 /// that "long format" is used for this member.
Sylvestre Ledru91ce36c2012-09-27 10:14:43 +0000133 /// @returns true iff the file name uses the long form
Michael J. Spencer53dcdc72011-01-15 21:43:45 +0000134 /// @brief Determine if the member has a long file name
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000135 bool hasLongFilename() const { return flags&HasLongFilenameFlag; }
136
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000137 /// This method causes the archive member to be replaced with the contents
138 /// of the file specified by \p File. The contents of \p this will be
139 /// updated to reflect the new data from \p File. The \p File must exist and
140 /// be readable on entry to this method.
141 /// @returns true if an error occurred, false otherwise
142 /// @brief Replace contents of archive member with a new file.
Rafael Espindola351a88f2013-06-19 17:49:07 +0000143 bool replaceWith(StringRef aFile, std::string* ErrMsg);
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000144
145 /// @}
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000146 /// @name Data
147 /// @{
148 private:
Rafael Espindolafca03892013-06-19 21:13:59 +0000149 Archive *parent; ///< Pointer to parent archive
150 std::string path; ///< Path of file containing the member
151 uint32_t User;
152 uint32_t Group;
153 uint32_t Mode;
154 sys::TimeValue ModTime;
155 uint64_t Size;
156 unsigned flags; ///< Flags about the archive member
157 const char *data; ///< Data for the member
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000158
159 /// @}
160 /// @name Constructors
161 /// @{
162 public:
163 /// The default constructor is only used by the Archive's iplist when it
164 /// constructs the list's sentry node.
165 ArchiveMember();
166
167 private:
168 /// Used internally by the Archive class to construct an ArchiveMember.
169 /// The contents of the ArchiveMember are filled out by the Archive class.
Dan Gohman13ab93e2007-10-08 15:08:41 +0000170 explicit ArchiveMember(Archive *PAR);
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000171
172 // So Archive can construct an ArchiveMember
173 friend class llvm::Archive;
174 /// @}
175};
176
177/// This class defines the interface to LLVM Archive files. The Archive class
178/// presents the archive file as an ilist of ArchiveMember objects. The members
179/// can be rearranged in any fashion either by directly editing the ilist or by
180/// using editing methods on the Archive class (recommended). The Archive
181/// class also provides several ways of accessing the archive file for various
182/// purposes such as editing and linking. Full symbol table support is provided
183/// for loading only those files that resolve symbols. Note that read
184/// performance of this library is _crucial_ for performance of JIT type
185/// applications and the linkers. Consequently, the implementation of the class
186/// is optimized for reading.
187class Archive {
Misha Brukman9e6fb742009-02-20 23:04:06 +0000188
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000189 /// @name Types
190 /// @{
191 public:
192 /// This is the ilist type over which users may iterate to examine
193 /// the contents of the archive
194 /// @brief The ilist type of ArchiveMembers that Archive contains.
195 typedef iplist<ArchiveMember> MembersList;
196
197 /// @brief Forward mutable iterator over ArchiveMember
198 typedef MembersList::iterator iterator;
199
200 /// @brief Forward immutable iterator over ArchiveMember
201 typedef MembersList::const_iterator const_iterator;
202
203 /// @brief Reverse mutable iterator over ArchiveMember
204 typedef std::reverse_iterator<iterator> reverse_iterator;
205
206 /// @brief Reverse immutable iterator over ArchiveMember
207 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
208
209 /// @brief The in-memory version of the symbol table
210 typedef std::map<std::string,unsigned> SymTabType;
211
212 /// @}
213 /// @name ilist accessor methods
214 /// @{
215 public:
216 inline iterator begin() { return members.begin(); }
217 inline const_iterator begin() const { return members.begin(); }
218 inline iterator end () { return members.end(); }
219 inline const_iterator end () const { return members.end(); }
220
221 inline reverse_iterator rbegin() { return members.rbegin(); }
222 inline const_reverse_iterator rbegin() const { return members.rbegin(); }
223 inline reverse_iterator rend () { return members.rend(); }
224 inline const_reverse_iterator rend () const { return members.rend(); }
225
Evan Cheng86cb3182008-05-05 18:30:58 +0000226 inline size_t size() const { return members.size(); }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000227 inline bool empty() const { return members.empty(); }
228 inline const ArchiveMember& front() const { return members.front(); }
229 inline ArchiveMember& front() { return members.front(); }
230 inline const ArchiveMember& back() const { return members.back(); }
231 inline ArchiveMember& back() { return members.back(); }
232
233 /// @}
234 /// @name ilist mutator methods
235 /// @{
236 public:
237 /// This method splices a \p src member from an archive (possibly \p this),
238 /// to a position just before the member given by \p dest in \p this. When
239 /// the archive is written, \p src will be written in its new location.
240 /// @brief Move a member to a new location
241 inline void splice(iterator dest, Archive& arch, iterator src)
242 { return members.splice(dest,arch.members,src); }
243
244 /// This method erases a \p target member from the archive. When the
245 /// archive is written, it will no longer contain \p target. The associated
246 /// ArchiveMember is deleted.
247 /// @brief Erase a member.
248 inline iterator erase(iterator target) { return members.erase(target); }
249
250 /// @}
251 /// @name Constructors
252 /// @{
253 public:
254 /// Create an empty archive file and associate it with the \p Filename. This
255 /// method does not actually create the archive disk file. It creates an
256 /// empty Archive object. If the writeToDisk method is called, the archive
257 /// file \p Filename will be created at that point, with whatever content
258 /// the returned Archive object has at that time.
259 /// @returns An Archive* that represents the new archive file.
260 /// @brief Create an empty Archive.
Rafael Espindola351a88f2013-06-19 17:49:07 +0000261 static Archive *CreateEmpty(
262 StringRef Filename, ///< Name of the archive to (eventually) create.
263 LLVMContext &C ///< Context to use for global information
264 );
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000265
266 /// Open an existing archive and load its contents in preparation for
267 /// editing. After this call, the member ilist is completely populated based
268 /// on the contents of the archive file. You should use this form of open if
269 /// you intend to modify the archive or traverse its contents (e.g. for
270 /// printing).
271 /// @brief Open and load an archive file
Rafael Espindola351a88f2013-06-19 17:49:07 +0000272 static Archive *OpenAndLoad(
273 StringRef filePath, ///< The file path to open and load
274 LLVMContext &C, ///< The context to use for global information
275 std::string *ErrorMessage ///< An optional error string
276 );
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000277
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000278 /// This destructor cleans up the Archive object, releases all memory, and
279 /// closes files. It does nothing with the archive file on disk. If you
280 /// haven't used the writeToDisk method by the time the destructor is
281 /// called, all changes to the archive will be lost.
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000282 /// @brief Destruct in-memory archive
283 ~Archive();
284
285 /// @}
286 /// @name Accessors
287 /// @{
288 public:
289 /// @returns the path to the archive file.
290 /// @brief Get the archive path.
Rafael Espindola351a88f2013-06-19 17:49:07 +0000291 StringRef getPath() { return archPath; }
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000292
293 /// This method is provided so that editing methods can be invoked directly
294 /// on the Archive's iplist of ArchiveMember. However, it is recommended
295 /// that the usual STL style iterator interface be used instead.
296 /// @returns the iplist of ArchiveMember
297 /// @brief Get the iplist of the members
298 MembersList& getMembers() { return members; }
299
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000300 /// This method returns the offset in the archive file to the first "real"
301 /// file member. Archive files, on disk, have a signature and might have a
302 /// symbol table that precedes the first actual file member. This method
303 /// allows you to determine what the size of those fields are.
304 /// @returns the offset to the first "real" file member in the archive.
305 /// @brief Get the offset to the first "real" file member in the archive.
306 unsigned getFirstFileOffset() { return firstFileOffset; }
307
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000308 /// @}
309 /// @name Mutators
310 /// @{
311 public:
312 /// This method is the only way to get the archive written to disk. It
313 /// creates or overwrites the file specified when \p this was created
314 /// or opened. The arguments provide options for writing the archive. If
Gabor Greife16561c2007-07-05 17:07:56 +0000315 /// \p CreateSymbolTable is true, the archive is scanned for bitcode files
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000316 /// and a symbol table of the externally visible function and global
317 /// variable names is created. If \p TruncateNames is true, the names of the
318 /// archive members will have their path component stripped and the file
319 /// name will be truncated at 15 characters. If \p Compress is specified,
320 /// all archive members will be compressed before being written. If
321 /// \p PrintSymTab is true, the symbol table will be printed to std::cout.
Dmitri Gribenko65340a62012-08-23 16:54:08 +0000322 /// @returns true if an error occurred, \p error set to error message;
323 /// returns false if the writing succeeded.
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000324 /// @brief Write (possibly modified) archive contents to disk
325 bool writeToDisk(
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000326 bool TruncateNames=false, ///< Truncate the filename to 15 chars
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000327 std::string* ErrMessage=0 ///< If non-null, where error msg is set
328 );
329
330 /// This method adds a new file to the archive. The \p filename is examined
331 /// to determine just enough information to create an ArchiveMember object
332 /// which is then inserted into the Archive object's ilist at the location
333 /// given by \p where.
Chris Lattner0ab5e2c2011-04-15 05:18:47 +0000334 /// @returns true if an error occurred, false otherwise
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000335 /// @brief Add a file to the archive.
Rafael Espindola351a88f2013-06-19 17:49:07 +0000336 bool addFileBefore(StringRef filename, ///< The file to be added
337 iterator where, ///< Insertion point
338 std::string *ErrMsg ///< Optional error message location
339 );
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000340
341 /// @}
342 /// @name Implementation
343 /// @{
344 protected:
345 /// @brief Construct an Archive for \p filename and optionally map it
346 /// into memory.
Rafael Espindola351a88f2013-06-19 17:49:07 +0000347 explicit Archive(StringRef filename, LLVMContext& C);
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000348
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000349 /// @returns A fully populated ArchiveMember or 0 if an error occurred.
350 /// @brief Parse the header of a member starting at \p At
351 ArchiveMember* parseMemberHeader(
352 const char*&At, ///< The pointer to the location we're parsing
353 const char*End, ///< The pointer to the end of the archive
354 std::string* error ///< Optional error message catcher
355 );
356
Reid Spencer446282a2007-08-05 20:06:04 +0000357 /// @param ErrMessage Set to address of a std::string to get error messages
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000358 /// @returns false on error
359 /// @brief Check that the archive signature is correct
360 bool checkSignature(std::string* ErrMessage);
361
Reid Spencer446282a2007-08-05 20:06:04 +0000362 /// @param ErrMessage Set to address of a std::string to get error messages
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000363 /// @returns false on error
364 /// @brief Load the entire archive.
365 bool loadArchive(std::string* ErrMessage);
366
Reid Spencer446282a2007-08-05 20:06:04 +0000367 /// @param ErrMessage Set to address of a std::string to get error messages
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000368 /// @returns false on error
369 /// @brief Load just the symbol table.
370 bool loadSymbolTable(std::string* ErrMessage);
371
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000372 /// Writes one ArchiveMember to an ofstream. If an error occurs, returns
Misha Brukman9e6fb742009-02-20 23:04:06 +0000373 /// false, otherwise true. If an error occurs and error is non-null then
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000374 /// it will be set to an error message.
Dmitri Gribenko65340a62012-08-23 16:54:08 +0000375 /// @returns false if writing member succeeded,
376 /// returns true if writing member failed, \p error set to error message.
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000377 bool writeMember(
378 const ArchiveMember& member, ///< The member to be written
Rafael Espindolae88d90a2013-06-21 22:11:36 +0000379 raw_fd_ostream& ARFile, ///< The file to write member onto
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000380 bool TruncateNames, ///< Should names be truncated to 11 chars?
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000381 std::string* ErrMessage ///< If non-null, place were error msg is set
382 );
383
384 /// @brief Fill in an ArchiveMemberHeader from ArchiveMember.
385 bool fillHeader(const ArchiveMember&mbr,
386 ArchiveMemberHeader& hdr,int sz, bool TruncateNames) const;
387
388 /// @brief Maps archive into memory
389 bool mapToMemory(std::string* ErrMsg);
390
391 /// @brief Frees all the members and unmaps the archive file.
392 void cleanUpMemory();
393
Gabor Greife16561c2007-07-05 17:07:56 +0000394 /// This type is used to keep track of bitcode modules loaded from the
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000395 /// symbol table. It maps the file offset to a pair that consists of the
Jeffrey Yasskin091217b2010-01-27 20:34:15 +0000396 /// associated ArchiveMember and the Module.
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000397 /// @brief Module mapping type
Jeffrey Yasskin091217b2010-01-27 20:34:15 +0000398 typedef std::map<unsigned,std::pair<Module*,ArchiveMember*> >
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000399 ModuleMap;
400
401
402 /// @}
403 /// @name Data
404 /// @{
405 protected:
Rafael Espindola351a88f2013-06-19 17:49:07 +0000406 std::string archPath; ///< Path to the archive file we read/write
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000407 MembersList members; ///< The ilist of ArchiveMember
Chris Lattnerd4310a22008-04-01 04:26:46 +0000408 MemoryBuffer *mapfile; ///< Raw Archive contents mapped into memory
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000409 const char* base; ///< Base of the memory mapped file data
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000410 std::string strtab; ///< The string table for long file names
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000411 unsigned firstFileOffset; ///< Offset to first normal file.
412 ModuleMap modules; ///< The modules loaded via symbol lookup.
Owen Anderson2a154432009-07-01 23:13:44 +0000413 LLVMContext& Context; ///< This holds global data.
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000414 /// @}
415 /// @name Hidden
416 /// @{
417 private:
Craig Topperb1d83e82012-09-18 02:01:41 +0000418 Archive() LLVM_DELETED_FUNCTION;
419 Archive(const Archive&) LLVM_DELETED_FUNCTION;
420 Archive& operator=(const Archive&) LLVM_DELETED_FUNCTION;
Chris Lattnerc9c5d3e2007-05-06 09:14:53 +0000421 /// @}
422};
423
424} // End llvm namespace
425
426#endif