Home | History | Annotate | Download | only in llvm-ar

Lines Matching full:archive

1 //===-- llvm-ar.cpp - LLVM archive librarian utility ----------------------===//
10 // Builds up (relatively) standard unix archive files (.a) containing LLVM
20 #include "llvm/Object/Archive.h"
70 cl::desc("[relpos] [count] <archive-file> [members]..."));
79 FormatOpt("format", cl::desc("Archive format to create"),
91 " d[NsS] - delete file(s) from the archive\n"
92 " m[abiSs] - move file(s) in the archive\n"
93 " p[kN] - print file(s) found in the archive\n"
94 " q[ufsS] - quick append file(s) to the archive\n"
95 " r[abfiuRsS] - replace or insert file(s) into the archive\n"
96 " t - display contents of archive\n"
97 " x[No] - extract file(s) from the archive\n"
103 " [s] - create an archive index (cf. ranlib)\n"
105 " [u] - update only files newer than archive contents\n"
111 // This enumeration delineates the kinds of operations on an archive
114 Print, ///< Print the contents of the archive
117 QuickAppend, ///< Quickly append to end of archive
121 CreateSymTab ///< Create a symbol table in an existing archive
136 // the name of the archive member to which the 'a', 'b' or 'i' modifier
141 // This variable holds the name of the archive file as given on the
173 // Get the archive file name from the command line
176 show_help("An archive name must be specified");
265 // the archive name.
275 show_help("The s operation takes only an archive as argument");
300 // Implements the 'p' operation. This function traverses the archive
302 static void doPrint(StringRef Name, const object::Archive::Child &C) {
324 static void doDisplayTable(StringRef Name, const object::Archive::Child &C) {
343 static void doExtract(StringRef Name, const object::Archive::Child &C) {
392 object::Archive *OldArchive) {
394 fail("extracting from a thin archive is not supported");
399 const object::Archive::Child &C = *ChildOrErr;
443 const object::Archive::Child &M, StringRef Name,
446 fail("Cannot convert a regular archive to a thin one");
463 const object::Archive::Child &Member,
514 object::Archive *OldArchive) {
582 performWriteOperation(ArchiveOperation Operation, object::Archive *OldArchive,
584 object::Archive::Kind Kind;
589 Kind = object::Archive::K_BSD;
591 Kind = object::Archive::K_GNU;
595 Kind = object::Archive::K_GNU;
598 Kind = object::Archive::K_BSD;
614 static void createSymbolTable(object::Archive *OldArchive) {
615 // When an archive is created or modified, if the s option is given, the
616 // resulting archive will have a current symbol table. If the S option
628 object::Archive *OldArchive,
652 // Create or open the archive object.
660 object::Archive Archive(Buf.get()->getMemBufferRef(), EC);
663 performOperation(Operation, &Archive, NewMembers);
673 // Produce a warning if we should and we're creating the archive
691 std::vector<std::unique_ptr<object::Archive>> Archives;
714 object::Archive::create(ArchiveBuffers.back()->getMemBufferRef());
717 object::Archive &Lib = *Archives.back();
763 fail(ToolName + "takes just one archive as argument");