summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Archive/ArchiveWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move lib/Archive to tools/llvm-ar.Rafael Espindola2013-06-171-429/+0
| | | | | | | 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-60/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Don't use PathV1.h in Signals.h.Rafael Espindola2013-06-131-2/+2
| | | | llvm-svn: 183947
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+3
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Remove references to compression in llvm-ar. It has been a long time since weRafael Espindola2012-08-101-4/+3
| | | | | | switched from a bytecode+bzip2 to the current bitcode. llvm-svn: 161651
* Support/FileSystem: Add file_magic and move a vew clients over to it.Michael J. Spencer2011-12-131-3/+3
| | | | llvm-svn: 146523
* Revert PathV2 changes, as sys::fs::unique_file is not finished yet.Dan Gohman2011-03-011-38/+36
| | | | llvm-svn: 126773
* Archive: Fix temp path names.Michael J. Spencer2011-01-171-4/+6
| | | | llvm-svn: 123660
* UnRevert "Revert "Archive: Replace all internal uses of PathV1 with PathV2. ↵Michael J. Spencer2011-01-161-36/+36
| | | | | | The external API still uses PathV1."" llvm-svn: 123605
* UnRevert "Revert the archive part of "Support/PathV2: Add identify_magic.""Michael J. Spencer2011-01-161-3/+5
| | | | | | This reverts commit dd103021a889a986a181ce36ed7b0e8dc9b645e1. llvm-svn: 123595
* Revert the archive part of "Support/PathV2: Add identify_magic."Michael J. Spencer2011-01-161-5/+3
| | | | llvm-svn: 123593
* Revert "Archive: Replace all internal uses of PathV1 with PathV2. The ↵Michael J. Spencer2011-01-161-36/+36
| | | | | | external API still uses PathV1." llvm-svn: 123557
* Archive: Replace all internal uses of PathV1 with PathV2. The external API ↵Michael J. Spencer2011-01-151-36/+36
| | | | | | still uses PathV1. llvm-svn: 123551
* Support/PathV2: Add identify_magic.Michael J. Spencer2011-01-151-3/+5
| | | | llvm-svn: 123548
* Fix Whitespace.Michael J. Spencer2011-01-101-6/+6
| | | | llvm-svn: 123152
* Support/Path: Deprecate PathV1::exists and replace all uses with ↵Michael J. Spencer2011-01-101-1/+3
| | | | | | PathV2::fs::exists. llvm-svn: 123151
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-161-6/+5
| | | | | | via an out parm. llvm-svn: 121958
* Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2010-12-091-4/+14
| | | | | | error_code &ec. And fix clients. llvm-svn: 121379
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | llvm-svn: 120298
* Eliminate some unnessary Path::exists() calls.Dan Gohman2010-05-271-8/+4
| | | | llvm-svn: 104888
* Don't write into MemoryBuffers.Benjamin Kramer2010-04-191-2/+1
| | | | llvm-svn: 101783
* Fix a grammaro.Dan Gohman2010-03-301-1/+1
| | | | llvm-svn: 99917
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-6/+6
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-10/+9
| | | | | | | | | | | | | | | | | | 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
* Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson2009-07-011-1/+1
| | | | | | | | the last time, for the moment, that I will need to make far-reaching changes. llvm-svn: 74655
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-1/+1
| | | | llvm-svn: 74640
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-4/+3
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* Avoid leaking memory in an error path. NoticedDuncan Sands2009-06-111-3/+4
| | | | | | by cppcheck. llvm-svn: 73187
* Silence unused variable warnings.Devang Patel2008-11-211-0/+4
| | | | llvm-svn: 59841
* Create archives with the same permissions are ar.Owen Anderson2008-05-241-0/+7
| | | | | | Patch by Mikael Lepistö. llvm-svn: 51540
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-2/+2
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Change the MemoryBuffer::getFile* methods to take just a pointer to theChris Lattner2008-04-011-4/+2
| | | | | | | | start of a filename, not a filename+length. All clients can produce a null terminated name, and the system api's require null terminated strings anyway. llvm-svn: 49041
* change the archive stuff to use MemoryBuffer instead of mappedfile.Chris Lattner2008-04-011-26/+20
| | | | | | | MemoryBuffer is higher level and more closely matches the model needed. llvm-svn: 49029
* Remove MappedFile support for mapping files for write and execChris Lattner2008-04-011-2/+2
| | | | | | | and shared. This complicates the design, is not used, and probably doesn't even work. llvm-svn: 49022
* add missing #includesChris Lattner2008-04-011-0/+1
| | | | llvm-svn: 49020
* Make llvm-ar behave like ar, if you create an empty archive, ar creates an ↵Andrew Lenharth2008-02-281-1/+1
| | | | | | empty archive. llvm-ar would not generate an output file in this case llvm-svn: 47733
* Update gcc 4.3 warnings fix patch with recent head changesAnton Korobeynikov2008-02-201-1/+2
| | | | llvm-svn: 47368
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* eliminate residual cruft related to recognizing bytecodeGabor Greif2007-07-061-7/+2
| | | | | | | files. bitcode files are the only LLVM format left. llvm-svn: 37945
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-6/+6
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* adjust this to live in lib/ArchiveChris Lattner2007-05-061-0/+482
llvm-svn: 36886
OpenPOWER on IntegriCloud