summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a wrapper for open.Rafael Espindola2013-07-161-18/+7
| | | | | | | This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). llvm-svn: 186447
* On error, close the temporary file descriptor.Rafael Espindola2013-07-161-1/+3
| | | | | | With this change llvm-ar can remove the temporary file on windows too. llvm-svn: 186423
* Use open+fstat instead of stat+open.Rafael Espindola2013-07-161-3/+13
| | | | llvm-svn: 186381
* Remember that we have a null terminated string.Rafael Espindola2013-07-161-4/+4
| | | | | | | This is a micro optimization. Instead of going char*->StringRef->Twine->char*, go char*->Twine->char* and avoid having to copy the filename on the stack. llvm-svn: 186380
* Try to open the file before use data from stat.Rafael Espindola2013-07-131-2/+3
| | | | | | | Looks like on mingw we get bogus last modification times on directories. Should fix the mingw bots. llvm-svn: 186240
* Remove unused file. Thanks to Sean Silva for noticing it.Rafael Espindola2013-07-131-419/+0
| | | | llvm-svn: 186239
* Add r186216 back, but make the test tolerant of different uids and gids.Rafael Espindola2013-07-131-1/+1
| | | | | | | original message: Fix a off by one error about which members need to use the string table. llvm-svn: 186238
* Revert commit r186216 -- it's breaking bots:Chandler Carruth2013-07-131-1/+1
| | | | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/6897/steps/check-all/logs/LLVM%3A%3Aarchive-format.test Original commit log: Fix a off by one error about which members need to use the string table. llvm-svn: 186232
* Fix a off by one error about which members need to use the string table.Rafael Espindola2013-07-121-1/+1
| | | | llvm-svn: 186216
* fix autoconf buildRafael Espindola2013-07-121-1/+1
| | | | llvm-svn: 186200
* Fix the build with c++03.Rafael Espindola2013-07-121-4/+2
| | | | llvm-svn: 186198
* Change llvm-ar to use lib/Object.Rafael Espindola2013-07-126-1182/+346
| | | | | | | | | | | | | | | | | | | | | | This fixes two bugs is lib/Object that the use in llvm-ar found: * In OS X created archives, the name can be padded with nulls. Strip them. * In the constructor, remember the first non special member and use that in begin_children. This makes sure we skip all special members, not just the first one. The change to llvm-ar itself consist of * Using lib/Object for reading archives instead of ArchiveReader.cpp. * Writing the modified archive directly, instead of creating an in memory representation. The old Archive library was way more general than what is needed, as can be seen by the diffstat of this patch. Having llvm-ar using lib/Object now opens the way for creating regular symbol tables for both native objects and bitcode files so that we can use those archives for LTO. llvm-svn: 186197
* Add static.Rafael Espindola2013-07-121-33/+25
| | | | llvm-svn: 186170
* llvm-ar: Clean up memory management with OwningPtr.Benjamin Kramer2013-07-111-15/+9
| | | | llvm-svn: 186131
* Use %llu to print a 64 bit number. Should fix the ARM bots.Rafael Espindola2013-07-111-1/+1
| | | | llvm-svn: 186113
* InsertBefore is the same as AddBefore. Delete it.Rafael Espindola2013-07-111-5/+4
| | | | llvm-svn: 186094
* Fix a FIXME about the format and add a test.Rafael Espindola2013-07-111-7/+5
| | | | | | | While at it, use strftime on Unix too and use the thread safe versions of localtime. llvm-svn: 186090
* Remove the 'N' modifier from llvm-ar.Rafael Espindola2013-07-111-45/+11
| | | | | | | | * It is not present on OS X. * It is untested. * It is not needed for using ar in a build system. llvm-svn: 186080
* Delete dead code.Rafael Espindola2013-07-111-3/+0
| | | | llvm-svn: 186079
* Remove support for truncating names in archives.Rafael Espindola2013-07-113-42/+9
| | | | | | | | | | * All systems we support have some form of long name support. * The options has different names and semantics in different implementations ('f' on gnu, 'T' on OS X), which makes it unlikely it is normally used on build systems. * It was completely untested. llvm-svn: 186078
* Sync llvm-ar's help string with the options it supports.Rafael Espindola2013-07-111-3/+0
| | | | llvm-svn: 186076
* Create files with the correct permission instead of changing it afterwards.Rafael Espindola2013-07-081-9/+6
| | | | | | No intended functionality change. llvm-svn: 185832
* Fixes problem when calling llvm-ar from an unmodifiable directory.Manuel Klimek2013-07-081-2/+2
| | | | | | | | | This fixes a regression introduced by r185726: the new call to get a unique file does not prepend the system temporary directory, so we need to anchor on the file that the temporary file gets moved to to ensure we're on the same file system. llvm-svn: 185825
* [llvm-ar] Added llvm_unreachable to quiet -Wreturn-type warnings.Michael Gottesman2013-07-061-0/+2
| | | | llvm-svn: 185751
* Add a createUniqueFile function and switch llvm's users of unique_file.Rafael Espindola2013-07-051-2/+2
| | | | | | | | | | | | | | This function is complementary to createTemporaryFile. It handles the case were the unique file is *not* temporary: we will rename it in the end. Since we will rename it, the file has to be in the same filesystem as the final destination and we don't prepend the system temporary directory. This has a small semantic difference from unique_file: the default mode is 0666. This matches the behavior of most unix tools. For example, with this change lld now produces files with the same permissions as ld. I will add a test of this change when I port clang over to createUniqueFile (next commit). llvm-svn: 185726
* Don't create an archive if, for example, we are asked to print the index.Rafael Espindola2013-07-051-2/+19
| | | | llvm-svn: 185697
* Use simpler version of exists.Rafael Espindola2013-07-051-2/+1
| | | | llvm-svn: 185695
* Remove NoOperation.Rafael Espindola2013-07-051-5/+1
| | | | | | | parseCommandLine prints and error and exists if no operation is specified, so it never returns NoOperation. llvm-svn: 185691
* Don't treat bitcode files specially in llvm-ar.Rafael Espindola2013-07-055-34/+2
| | | | | | | We really want bitcode files to behave as regular object files in archives, so we don't need to track that a member is bitcode. llvm-svn: 185681
* Use enums instead of raw octal values.Rafael Espindola2013-06-261-1/+1
| | | | | | Patch by 罗勇刚(Yonggang Luo). llvm-svn: 184971
* Create the file with the right permissions instead of setting it afterwards.Rafael Espindola2013-06-221-9/+1
| | | | | | Removes the last use of PathV1.h in llvm-ar. llvm-svn: 184630
* Convert some uses of PathV1.h in ArchiveWriter.cpp.Rafael Espindola2013-06-212-28/+29
| | | | llvm-svn: 184599
* Add a fixme.Rafael Espindola2013-06-201-0/+1
| | | | llvm-svn: 184486
* Remove last use of PathV1.h from Archive.cpp.Rafael Espindola2013-06-201-9/+14
| | | | llvm-svn: 184484
* Add a setLastModificationAndAccessTime to PathV2.Rafael Espindola2013-06-201-19/+35
| | | | | | With this we can remove the last use of PathV1 from llvm-ar.cpp. llvm-svn: 184464
* Use a raw_fd_ostream instead of a std::ofstream.Rafael Espindola2013-06-201-4/+5
| | | | llvm-svn: 184460
* Remove a trivial use of sys::Path.Rafael Espindola2013-06-201-12/+5
| | | | llvm-svn: 184455
* Add support for getting the last modification time from a file_status.Rafael Espindola2013-06-201-6/+5
| | | | | | Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus. llvm-svn: 184450
* Use only the filename when deciding if a file is a duplicate.Rafael Espindola2013-06-201-1/+1
| | | | | | Matches gnu ar behavior. llvm-svn: 184448
* Add r184420 back, but also handle long file names.Rafael Espindola2013-06-204-38/+9
| | | | | | | | | | Original message: Don't include directory names in archives. This matches the behavior of both gnu and os x versions of ar. llvm-svn: 184423
* Revert "Don't include directory names in archives."Rafael Espindola2013-06-204-7/+36
| | | | | | | This reverts commit 184420. Investigating the bot failures. llvm-svn: 184421
* Don't include directory names in archives.Rafael Espindola2013-06-204-36/+7
| | | | | | This matches the behavior of both gnu and os x versions of ar. llvm-svn: 184420
* Remove remaining bits of the old LLVM specific symtab handling.Rafael Espindola2013-06-206-231/+10
| | | | llvm-svn: 184418
* Remove more unused functions.Rafael Espindola2013-06-202-81/+0
| | | | llvm-svn: 184416
* Remove unused methods.Rafael Espindola2013-06-202-170/+0
| | | | llvm-svn: 184415
* Use the simpler sys::fs::exists.Rafael Espindola2013-06-201-2/+1
| | | | llvm-svn: 184413
* Convert a use of sys::Path.Rafael Espindola2013-06-201-16/+10
| | | | llvm-svn: 184412
* Remove unused function.Rafael Espindola2013-06-193-31/+3
| | | | llvm-svn: 184359
* Really fix the missing header :-(Rafael Espindola2013-06-191-1/+1
| | | | llvm-svn: 184355
* Add missing include found by the bots.Rafael Espindola2013-06-191-0/+1
| | | | llvm-svn: 184354
OpenPOWER on IntegriCloud