summaryrefslogtreecommitdiff
path: root/lib/Bytecode/Archive
AgeCommit message (Collapse)AuthorFilesLines
2007-05-06move this to lib/ArchiveChris Lattner5-1486/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36888 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06Switch this over to bitcode instead of bytecode.Chris Lattner4-60/+40
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36866 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06add bitcode supportChris Lattner2-50/+44
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36856 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07Avoid a useless temporary constrution.Reid Spencer1-2/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35747 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07Fix another PathWithStatus issue.Reid Spencer1-1/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35744 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-04For PR1302:Reid Spencer3-6/+6
Adjust useage of sys::Path::FileType for new enumerator names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35651 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29For PR789:Reid Spencer2-2/+8
Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35476 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29For PR789:Reid Spencer2-2/+2
Updates for change in interface of getFileStatus method of sys::Path class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35458 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07move archive-specific stuff out of bcreader into archive library.Chris Lattner2-3/+80
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34022 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07push bytecode decompressor out through APIs. Now the bytecode readerChris Lattner3-12/+17
api's look like this: ModuleProvider *getBytecodeModuleProvider( const std::string &Filename, ///< Name of file to be read BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer, std::string* ErrMsg = 0, ///< Optional error message holder BytecodeHandler* H = 0 ///< Optional handler for reader events ); This is ugly, but allows a client to say: getBytecodeModuleProvider("foo", 0); If they do this, there is no dependency on the compression libraries, saving codesize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34012 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15For PR1050:Reid Spencer3-6/+27
Convert asserts into error messages. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32607 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28Use ostream instead of iostreamBill Wendling1-2/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31986 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25For PR797:Reid Spencer1-1/+0
Final commit for this bug. This removes the last EH holdouts in LLVM and turns off exception support by using the -fno-exceptions option. This leads to the following reduction in library and executable sizes: DEBUG BUILD RELEASE BUILD before after delta before after delta lib 162,328K 157,616K 4,712 17,864K 16,416K 1,448K bin 571,444K 557,156K 14,288 63,296K 56,996K 6,300K Debug Improvement: 19,000K (2.59%) Release Improvement: 7,748K (9.55%) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29882 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25For PR797:Reid Spencer2-6/+9
Remove exception throwing/handling from lib/Bytecode, and adjust its users to compensate for changes in the interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29875 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24For PR797:Reid Spencer3-57/+65
Remove exception handling from the bytecode archiver and adjust the llvm-ar tool to accommodate the new interfaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29866 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23For PR797:Reid Spencer1-2/+4
Eliminate exception throwing from Path::renamePathOnDisk and adjust its users correspondingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23For PR797:Reid Spencer1-2/+4
Remove exceptions from the Path::create*OnDisk methods. Update their users to handle error messages via arguments and result codes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29840 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22Inverse the error check logic for the MappedFile::map() call. It returnsReid Spencer1-1/+1
a null pointer when there is an error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29827 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22For PR797:Reid Spencer2-6/+19
Adjust to new interface for MappedFile. Note that the new "throw" statements will be removed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29818 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28Modify Path::eraseFromDisk to not throw an exception.Chris Lattner1-6/+5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28Change Path::getStatusInfo to return a boolean and error string on an errorChris Lattner2-3/+7
instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29395 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28Exceptions are thrown by and through this library.Chris Lattner1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29393 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07Finish removal of EH usage from the Archive library. The REQUIRES_EH flagReid Spencer3-70/+137
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to a smaller LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07Remove EH use from the Archive library and adjust its users accordingly.Reid Spencer1-98/+109
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29066 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07These libs use EH infoChris Lattner1-1/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29043 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12When reading the symbol table, make sure to delete the ArchiveMemberReid Spencer1-0/+2
created by reading the symbol table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28251 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-06Apply bug fix supplied by Greg Pettyjohn for a bug he found: '<invalid>' is ↵Jeff Cohen1-1/+1
not a legal path on Windows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28153 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26more C++ daintinessDuraid Madina1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25023 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30Fix a problem with llvm-ranlib that (on some platforms) caused the archiveReid Spencer2-36/+72
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
2005-10-24DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE nowChris Lattner1-1/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23940 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23speed up Archive::isBytecodeArchive in the case when the archive doesn't haveChris Lattner1-18/+24
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
2005-07-08Final Changes For PR495:Reid Spencer1-4/+4
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
2005-07-07For PR495:Reid Spencer2-4/+4
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
2005-05-05Remove vim settings from source code; people should use llvm/utils/vim/vimrcMisha Brukman1-1/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21704 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21Remove trailing whitespaceMisha Brukman4-93/+93
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21Use the actual uid/gid for defaulting the fields in the archive.Reid Spencer1-2/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21405 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21Eliminate calls to system dependent function getuid by usingReid Spencer1-2/+3
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
2005-04-20Initialize fields mode, uid, and gid.Misha Brukman1-0/+6
Patch by Markus Oberhumer. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21369 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20Align comments together for consistencyMisha Brukman1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21368 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-26Implement an isBytecodeArchive method to determine if an archive containsReid Spencer1-0/+29
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
2005-01-28Properly close mapped files.Jeff Cohen2-3/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19863 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22Use binary mode for reading/writing bytecode filesJeff Cohen1-2/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-29Remove potential platform portability issue with size of "int".Reid Spencer1-1/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19172 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20Fix problems uncovered by VC++ (first time compiled by VC++)Jeff Cohen2-2/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19056 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15For PR351:Reid Spencer1-1/+0
* 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
2004-12-13Make sure the Archive gets deleted if there's an error.Reid Spencer1-4/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18869 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13Implement error handling in OpenAndLoad* functions so the Linker can handle it.Reid Spencer1-13/+22
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18853 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11Path::get -> Path::toStringReid Spencer3-22/+24
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-28Compute the firstFileOffset correctly after reading the LLVM symbol table.Reid Spencer1-2/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18300 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25Adjust to Compressor interface changeReid Spencer1-2/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18249 91177308-0d34-0410-b5e6-96231b3b80d8