summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar/llvm-ar.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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 the build with c++03.Rafael Espindola2013-07-121-4/+2
| | | | llvm-svn: 186198
* Change llvm-ar to use lib/Object.Rafael Espindola2013-07-121-327/+345
| | | | | | | | | | | | | | | | | | | | | | 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
* 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-111-22/+4
| | | | | | | | | | * 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
* [llvm-ar] Added llvm_unreachable to quiet -Wreturn-type warnings.Michael Gottesman2013-07-061-0/+2
| | | | llvm-svn: 185751
* 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-051-8/+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
* Add a fixme.Rafael Espindola2013-06-201-0/+1
| | | | llvm-svn: 184486
* 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-201-8/+0
| | | | | | | | | | 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-201-0/+8
| | | | | | | This reverts commit 184420. Investigating the bot failures. llvm-svn: 184421
* Don't include directory names in archives.Rafael Espindola2013-06-201-8/+0
| | | | | | 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-201-29/+6
| | | | llvm-svn: 184418
* Convert a use of sys::Path.Rafael Espindola2013-06-201-16/+10
| | | | llvm-svn: 184412
* Remove last use of PathV1.h from Archive.hRafael Espindola2013-06-191-0/+1
| | | | | | Store the individual fields we need instead of a sys::FileStatus. llvm-svn: 184353
* Always set the mode.Rafael Espindola2013-06-191-4/+10
| | | | | | | This matches GNU ar behavior. Also remove the now unused getFileStatus method. Not sure how to add a test, it would have to run ls -l or something like that. llvm-svn: 184337
* Remove more uses of sys::Path.Rafael Espindola2013-06-191-6/+6
| | | | llvm-svn: 184328
* Another attempt at fixing the bots.Rafael Espindola2013-06-191-1/+1
| | | | llvm-svn: 184318
* Attempt at fixing some bots.Rafael Espindola2013-06-191-1/+1
| | | | llvm-svn: 184316
* Reduce sys::Path usage in llvm-ar.Rafael Espindola2013-06-191-19/+21
| | | | llvm-svn: 184315
* Remove the 'R' modifier.Rafael Espindola2013-06-191-45/+4
| | | | | | | It is not present in GNU or OS X versions and doesn't make a lot of sense for llvm-ar. llvm-svn: 184306
* Move lib/Archive to tools/llvm-ar.Rafael Espindola2013-06-171-1/+1
| | | | | | | llvm-ar is the only tool that needs to write archive files. Every other tool should be able to use the lib/Object interface. llvm-svn: 184083
* Remove the LLVM specific archive index.Rafael Espindola2013-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Archive files (.a) can have a symbol table indicating which object files in them define which symbols. The purpose of this symbol table is to speed up linking by allowing the linker the read only the .o files it is actually going to use instead of having to parse every object's symbol table. LLVM's archive library currently supports a LLVM specific format for such table. It is hard to see any value in that now that llvm-ld is gone: * System linkers don't use it: GNU ar uses the same plugin as the linker to create archive files with a regular index. The OS X ar creates no symbol table for IL files, I assume the linker just parses all IL files. * It doesn't interact well with archives having both IL and native objects. * We probably don't want to be responsible for yet another archive format variant. This patch then: * Removes support for creating and reading such index from lib/Archive. * Remove llvm-ranlib, since there is nothing left for it to do. We should in the future add support for regular indexes to llvm-ar for both native and IL objects. When we do that, llvm-ranlib should be reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s". llvm-svn: 184019
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Sort the #include lines for tools/...Chandler Carruth2012-12-041-4/+4
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. llvm-svn: 169252
* Adjust llvm-ar and llvm-ranlib to not depend on exception handling.Joerg Sonnenberger2012-10-261-99/+104
| | | | | | | | Always use an exit code of 1, but print the help message if useful. Remove the exception handling tag in llvm-as, llvm-dis and llvm-bcanalyzer, where it isn't used. llvm-svn: 166767
* Remove references to compression in llvm-ar. It has been a long time since weRafael Espindola2012-08-101-13/+6
| | | | | | switched from a bytecode+bzip2 to the current bitcode. llvm-svn: 161651
* Fix Whitespace.Michael J. Spencer2011-01-101-14/+14
| | | | llvm-svn: 123152
* Support/Path: Deprecate PathV1::exists and replace all uses with ↵Michael J. Spencer2011-01-101-2/+5
| | | | | | PathV2::fs::exists. llvm-svn: 123151
* convert llvm-ar and llvm-ranlib to raw_ostream from iostreams.Chris Lattner2010-11-291-21/+20
| | | | | | Patch by Danil Malyshev! llvm-svn: 120341
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120298
* remove the last *stream> #include from a public header.Chris Lattner2009-08-241-0/+1
| | | | llvm-svn: 79892
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-12/+11
| | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. llvm-svn: 79869
* To simplify the upcoming context-on-type change, switch all command line ↵Owen Anderson2009-07-151-1/+1
| | | | | | | | tools to using the default global context for now. This will let us to hardwire stuff to the global context in the short term while the API is sorted out. llvm-svn: 75846
* Use errs() instead of std::cerr.Dan Gohman2009-07-151-8/+9
| | | | llvm-svn: 75791
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-2/+2
| | | | llvm-svn: 74640
OpenPOWER on IntegriCloud