X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fllvm-ar%2Fllvm-ar.cpp;h=a6611a3e8091c75ef36c11cc3b92f5fe8bf5d466;hb=73b43b9b549a75fb0015c825df68abd95705a67c;hp=2cd16e361e0411d0f12c01f801b0520255f52b4c;hpb=a99be51bf5cdac1438069d4b01766c47704961c8;p=oota-llvm.git diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index 2cd16e361e0..a6611a3e809 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -23,7 +23,7 @@ #include using namespace llvm; -// Option for compatibility with ASIX, not used but must allow it to be present. +// Option for compatibility with AIX, not used but must allow it to be present. static cl::opt X32Option ("X32_64", cl::Hidden, cl::desc("Ignored option for compatibility with AIX")); @@ -188,6 +188,7 @@ ArchiveOperation parseCommandLine() { case 'd': ++NumOperations; Operation = Delete; break; case 'm': ++NumOperations; Operation = Move ; break; case 'p': ++NumOperations; Operation = Print; break; + case 'q': ++NumOperations; Operation = QuickAppend; break; case 'r': ++NumOperations; Operation = ReplaceOrInsert; break; case 't': ++NumOperations; Operation = DisplayTable; break; case 'x': ++NumOperations; Operation = Extract; break; @@ -356,8 +357,7 @@ bool doPrint(std::string* ErrMsg) { // Skip things that don't make sense to print if (I->isLLVMSymbolTable() || I->isSVR4SymbolTable() || - I->isBSD4SymbolTable() || (!DontSkipBitcode && - (I->isBytecode() || I->isCompressedBytecode()))) + I->isBSD4SymbolTable() || (!DontSkipBitcode && I->isBitcode())) continue; if (Verbose) @@ -406,10 +406,8 @@ doDisplayTable(std::string* ErrMsg) { if (Verbose) { // FIXME: Output should be this format: // Zrw-r--r-- 500/ 500 525 Nov 8 17:42 2004 Makefile - if (I->isBytecode()) + if (I->isBitcode()) std::cout << "b"; - else if (I->isCompressedBytecode()) - std::cout << "B"; else if (I->isCompressed()) std::cout << "Z"; else @@ -693,7 +691,7 @@ int main(int argc, char **argv) { // Have the command line options parsed and handle things // like --help and --version. cl::ParseCommandLineOptions(argc, argv, - " LLVM Archiver (llvm-ar)\n\n" + "LLVM Archiver (llvm-ar)\n\n" " This program archives bitcode files into single libraries\n" ); @@ -719,6 +717,7 @@ int main(int argc, char **argv) { if (!Create) std::cerr << argv[0] << ": creating " << ArchivePath.toString() << "\n"; TheArchive = Archive::CreateEmpty(ArchivePath); + TheArchive->writeToDisk(); } else { std::string Error; TheArchive = Archive::OpenAndLoad(ArchivePath, &Error);