summaryrefslogtreecommitdiff
path: root/lib/Archive
AgeCommit message (Collapse)AuthorFilesLines
2013-06-17Move lib/Archive to tools/llvm-ar.Rafael Espindola7-1371/+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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184083 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14Remove the LLVM specific archive index.Rafael Espindola4-148/+7
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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184019 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13Don't use PathV1.h in Signals.h.Rafael Espindola1-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183947 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-11Convert another use of sys::identifyFileType.Rafael Espindola1-8/+6
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183754 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-11Convert another use of sys::identifyFileType.Rafael Espindola1-8/+6
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183746 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-10Pass a StringRef to sys::identifyFileType.Rafael Espindola2-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183669 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-26Fix auto_ptr is deprecated warningsMatt Arsenault1-11/+11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176123 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-26Fix typoMatt Arsenault1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176117 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02Move all of the header files which are involved in modelling the LLVM IRChandler Carruth3-3/+3
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth1-2/+1
missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169224 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03Use the new script to sort the includes of every file under lib.Chandler Carruth3-4/+7
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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-05Mark checkSignature const, and in turn stop casting away const fromRoman Divacky2-3/+3
ArchiveMemberHeader. Found by gcc48 -Wcast-qual. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163255 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10Remove references to compression in llvm-ar. It has been a long time since weRafael Espindola2-10/+4
switched from a bytecode+bzip2 to the current bitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161651 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-23Include cstdio in a few place that depended on getting it transitively ↵Benjamin Kramer1-0/+1
through StringExtras.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153328 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-23Avoid using an invalidated iterator.Rafael Espindola1-1/+5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148681 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-23The iteration order over a std::set<Module*> depends on the addresses of theRafael Espindola1-13/+15
modules. Avoid that to make the order the linker sees the modules deterministic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148676 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-13Support/FileSystem: Add file_magic and move a vew clients over to it.Michael J. Spencer1-3/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146523 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-12LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar1-1/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146409 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-29build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar1-6/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145420 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-03build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar1-0/+23
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143634 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth1-0/+6
specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136433 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01Revert PathV2 changes, as sys::fs::unique_file is not finished yet.Dan Gohman1-38/+36
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126773 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-17Archive: Fix temp path names.Michael J. Spencer1-4/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123660 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-16UnRevert "Revert "Archive: Replace all internal uses of PathV1 with PathV2. ↵Michael J. Spencer1-36/+36
The external API still uses PathV1."" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123605 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-16UnRevert "Revert the archive part of "Support/PathV2: Add identify_magic.""Michael J. Spencer2-6/+7
This reverts commit dd103021a889a986a181ce36ed7b0e8dc9b645e1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123595 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-16Revert the archive part of "Support/PathV2: Add identify_magic."Michael J. Spencer2-7/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123593 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-16Revert "Archive: Replace all internal uses of PathV1 with PathV2. The ↵Michael J. Spencer1-36/+36
external API still uses PathV1." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123557 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-15Archive: Replace all internal uses of PathV1 with PathV2. The external API ↵Michael J. Spencer1-36/+36
still uses PathV1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123551 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-15Support/PathV2: Add identify_magic.Michael J. Spencer2-6/+7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123548 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-10Fix Whitespace.Michael J. Spencer2-17/+17
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123152 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-10Support/Path: Deprecate PathV1::exists and replace all uses with ↵Michael J. Spencer2-3/+7
PathV2::fs::exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123151 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2-14/+11
via an out parm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-09Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2-8/+25
error_code &ec. And fix clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29Merge System into Support.Michael J. Spencer3-4/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer1-2/+0
This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer1-0/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27Eliminate some unnessary Path::exists() calls.Dan Gohman1-8/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104888 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-25silence a warning, patch by "mike".Chris Lattner1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19Don't write into MemoryBuffers.Benjamin Kramer4-18/+13
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101783 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19Fix -Wcast-qual warnings.Dan Gohman2-4/+7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101779 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07add newlines at end of files.Chris Lattner1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30Fix a grammaro.Dan Gohman1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99917 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-04From PR6228:Chris Lattner1-1/+2
"Attached patch removes the extra NUL bytes from the output and changes test/Archive/MacOSX.toc from a binary to a text file (removes svn:mime-type=application/octet-stream and adds svn:eol-style=native). I can't figure out how to get SVN to include the new contents of the file in the patch so I'm attaching it separately." Patch by James Abbatiello! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin4-59/+44
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner1-1/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22Stop building RTTI information for *most* llvm libraries. NotableChris Lattner1-0/+1
missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner3-26/+25
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-04Factor some of the constants+context related code out into a separate ↵Owen Anderson1-1/+1
header, to make LLVMContextImpl.h not hideous. Also, fix some MSVC compile errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13Fix some non-sensical code.Daniel Dunbar1-1/+4
- This makes it more like other similar code in Archive handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75452 91177308-0d34-0410-b5e6-96231b3b80d8