summaryrefslogtreecommitdiff
path: root/lib/Archive
Commit message (Collapse)AuthorAge
* When reading the symbol table, make sure to delete the ArchiveMemberReid Spencer2006-05-12
| | | | | | | created by reading the symbol table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28251 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply bug fix supplied by Greg Pettyjohn for a bug he found: '<invalid>' is ↵Jeff Cohen2006-05-06
| | | | | | not a legal path on Windows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28153 91177308-0d34-0410-b5e6-96231b3b80d8
* more C++ daintinessDuraid Madina2005-12-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25023 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a problem with llvm-ranlib that (on some platforms) caused the archiveReid Spencer2005-11-30
| | | | | | | | | | | file to become corrupted due to interactions between mmap'd memory segments and file descriptors closing. The problem is completely avoiding by using a third temporary file. Patch provided by Evan Jones git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24527 91177308-0d34-0410-b5e6-96231b3b80d8
* DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE nowChris Lattner2005-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23940 91177308-0d34-0410-b5e6-96231b3b80d8
* speed up Archive::isBytecodeArchive in the case when the archive doesn't haveChris Lattner2005-09-23
| | | | | | | | an llvm-ranlib symtab. This speeds up gccld -native on an almost empty .o file from 1.63s to 0.18s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23406 91177308-0d34-0410-b5e6-96231b3b80d8
* Final Changes For PR495:Reid Spencer2005-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | This chagne just renames some sys::Path methods to ensure they are not misused. The Path documentation now divides methods into two dimensions: Path/Disk and accessor/mutator. Path accessors and mutators only operate on the Path object itself without making any disk accesses. Disk accessors and mutators will also access or modify the file system. Because of the potentially destructive nature of disk mutators, it was decided that all such methods should end in the work "Disk" to ensure the user recognizes that the change will occur on the file system. This patch makes that change. The method name changes are: makeReadable -> makeReadableOnDisk makeWriteable -> makeWriteableOnDisk makeExecutable -> makeExecutableOnDisk setStatusInfo -> setStatusInfoOnDisk createDirectory -> createDirectoryOnDisk createFile -> createFileOnDisk createTemporaryFile -> createTemporaryFileOnDisk destroy -> eraseFromDisk rename -> renamePathOnDisk These changes pass the Linux Deja Gnu tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22354 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR495:Reid Spencer2005-07-07
| | | | | | | | | | | | | | | | | | | | | | Get rid of the difference between file paths and directory paths. The Path class now simply stores a path that can refer to either a file or a directory. This required various changes in the implementation and interface of the class with the corresponding impact to its users. Doxygen comments were also updated to reflect these changes. Interface changes are: appendDirectory -> appendComponent appendFile -> appendComponent elideDirectory -> eraseComponent elideFile -> eraseComponent elideSuffix -> eraseSuffix renameFile -> rename setDirectory -> set setFile -> set Changes pass Dejagnu and llvm-test/SingleSource tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22349 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove vim settings from source code; people should use llvm/utils/vim/vimrcMisha Brukman2005-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21704 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the actual uid/gid for defaulting the fields in the archive.Reid Spencer2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21405 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate calls to system dependent function getuid by usingReid Spencer2005-04-21
| | | | | | | | the newly implemented sys::Process::GetCurrentUserId function. Replace similarly for getgid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21402 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize fields mode, uid, and gid.Misha Brukman2005-04-20
| | | | | | | Patch by Markus Oberhumer. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21369 91177308-0d34-0410-b5e6-96231b3b80d8
* Align comments together for consistencyMisha Brukman2005-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21368 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement an isBytecodeArchive method to determine if an archive containsReid Spencer2005-02-26
| | | | | | | | bytecode file members or not. Patch Contributed By Adam Treat git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20338 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly close mapped files.Jeff Cohen2005-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19863 91177308-0d34-0410-b5e6-96231b3b80d8
* Use binary mode for reading/writing bytecode filesJeff Cohen2005-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove potential platform portability issue with size of "int".Reid Spencer2004-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19172 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix problems uncovered by VC++ (first time compiled by VC++)Jeff Cohen2004-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19056 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2004-12-15
| | | | | | | | * Remove #inclusion of FileUtilities.h, not needed any more. * Convert getUniqueFilename -> sys::Pat::makeUnique() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18948 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure the Archive gets deleted if there's an error.Reid Spencer2004-12-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18869 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement error handling in OpenAndLoad* functions so the Linker can handle it.Reid Spencer2004-12-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18853 91177308-0d34-0410-b5e6-96231b3b80d8
* Path::get -> Path::toStringReid Spencer2004-12-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18785 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute the firstFileOffset correctly after reading the LLVM symbol table.Reid Spencer2004-11-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18300 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to Compressor interface changeReid Spencer2004-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18249 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow reading of member names that begin with an _ character.Reid Spencer2004-11-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18179 91177308-0d34-0410-b5e6-96231b3b80d8
* Distinguish between BSD4.4 and SVR4 symbol tablesReid Spencer2004-11-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18044 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct the computation of when to add the padding. It is not based on theReid Spencer2004-11-19
| | | | | | | | | member's size. It is based on the oddness/evenness of the file pointer. This fixes a bug with llvm-ar not being able to read archives produced by llvm-ranlib when there are members with odd long file name lengths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17997 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't save an iterator, just use post-increment.Reid Spencer2004-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17981 91177308-0d34-0410-b5e6-96231b3b80d8
* Make findModulesDefiningSymbols modify its symbols argument so we can \Reid Spencer2004-11-19
| | | | | | | eliminate symbols defined by the archive efficiently git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17976 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some things for Mac OSX archives:Reid Spencer2004-11-17
| | | | | | | | | | | | * ensure trailing spaces are eliminated so they don't factor into the length of a member's name. * make sure all the bytes of a name are written even if the name ends in multiple null characters (bug in OSX ar) * make sure we provide the full member name when searching for symbols so the module name is not accidentally duplicated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17918 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure we parse bytecode with a module identifier that reflects the fullReid Spencer2004-11-17
| | | | | | | name of the module: "Archive.a(object.o)" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17917 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust long file name writing to match BSD 4.4 and Mac OSX style archives.Reid Spencer2004-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17910 91177308-0d34-0410-b5e6-96231b3b80d8
* Despite documentation to the contrary, Mac OSX and BSD 4.4 archive formatsReid Spencer2004-11-17
| | | | | | | | *do* include the length of the long file in the length of the member and they are *not* null terminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17909 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typeo in comment.Reid Spencer2004-11-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17892 91177308-0d34-0410-b5e6-96231b3b80d8
* Per code review:\Reid Spencer2004-11-16
| | | | | | | | | | | | | * Make the numVbrBytes function more efficient and better documented \ * Fix a bug in name truncation \ * Add comments before functions \ * Get rid of functions that are now inlined into the header \ * Do not have Archive doing symbol table printing \ * Put assert comments into the assert so they print out \ * Make sure foreign symbol tables are written git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17884 91177308-0d34-0410-b5e6-96231b3b80d8
* Per code review:\Reid Spencer2004-11-16
| | | | | | | | * Make sure we write out the foreign symbol table if we read one \ * Make the padding calculation more efficiently and avoid Solaris warnings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17883 91177308-0d34-0410-b5e6-96231b3b80d8
* Per code review:\Reid Spencer2004-11-16
| | | | | | | * Make sure all members are initialized upon construction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17882 91177308-0d34-0410-b5e6-96231b3b80d8
* * Make sure the string table gets read even if there isn't a foreignReid Spencer2004-11-15
| | | | | | | | | symbol table. * Make sure we update the file pointer for each member when rebuilding the symbol table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17812 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes necessary to enable linking of archives without LLVM symbol tables.Reid Spencer2004-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17811 91177308-0d34-0410-b5e6-96231b3b80d8
* Completely rewritten to allow reading of archives and symbol table lookup in ↵Reid Spencer2004-11-14
| | | | | | a more efficient manner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17767 91177308-0d34-0410-b5e6-96231b3b80d8
* Implementation declarations for ArchiveReid Spencer2004-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17766 91177308-0d34-0410-b5e6-96231b3b80d8
* First working versionReid Spencer2004-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17765 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved to lib/Bytecode/Archive in preparation for re-write.Reid Spencer2004-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17742 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize compressed LLVM bytecode files.John Criswell2004-11-09
| | | | | | | | This should fix the problem of not being able to link compressed LLVM bytecode files from LLVM libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17648 91177308-0d34-0410-b5e6-96231b3b80d8
* Makefile for the LLVMArchive library.Reid Spencer2004-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17500 91177308-0d34-0410-b5e6-96231b3b80d8
* First kinda/sorta working version of the Archive library. Reading is notReid Spencer2004-11-06
| | | | | | | yet supported but writing works. Way too early to review this. More to come git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17499 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #include <iostream> which is needed now that Value.h doesn't include itReid Spencer2004-07-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14600 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new FileUtilities.h API for mapping a file into an addressChris Lattner2004-05-28
| | | | | | | space git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13864 91177308-0d34-0410-b5e6-96231b3b80d8