Commit Graph

154 Commits

Author SHA1 Message Date
Owen Anderson
a4bf5c046d Add an AllocateRW to match AllocateRWX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48676 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-22 02:33:53 +00:00
Dan Gohman
fbee880cfb Specialize FORCE_DEFINING_FILE_TO_BE_LINKED using a GCC trick
to avoid using constructor calls for static objects. This reduces
the number of objects requiring static constructors in a typical
LLVM build by around 20%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48665 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 23:38:23 +00:00
Chris Lattner
9453295a29 Restore this member, which is used on win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48372 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 21:17:54 +00:00
Devang Patel
a13341737d Remove unused GetAddressOfSymbol()
Thanks Daniel Dunbar!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48340 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 16:55:34 +00:00
Chris Lattner
1a091447f4 Stub out a Path::GetMainExecutable call to find the path to the
main executable of a program.  This needs to be implemented on windows.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47835 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 02:55:43 +00:00
Chris Lattner
e1b332a304 Add path separator support, patch by Sam Bishop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47662 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27 06:17:10 +00:00
Anton Korobeynikov
e18bc08fbc Add convenient helper to get suffix of the file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47397 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 19:41:22 +00:00
Chris Lattner
7ed47a1335 Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 19:59:42 +00:00
Ted Kremenek
79200788df Added "GetCurrentDirectory()" to sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 22:07:33 +00:00
Ted Kremenek
fd52711675 Added "isDirectory" method to llvm::sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45168 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:46:22 +00:00
Chris Lattner
ef361a638a remove obviously dead uses of IncludeFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45165 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:15:48 +00:00
Duncan Sands
67f1c493d1 Remove host endianness info from TargetData and
put it in a new header System/Host.h instead.
Instead of getting the endianness from configure,
calculate it directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44959 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 23:03:45 +00:00
Reid Spencer
181b6c9cb5 Fix minor doxygen nits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40854 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-05 20:06:04 +00:00
Gabor Greif
e75ca3d809 eliminate residual cruft related to recognizing bytecode
files.
bitcode files are the only LLVM format left.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37945 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 13:38:17 +00:00
Gabor Greif
a99be51bf5 Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 17:07:56 +00:00
Chris Lattner
609083b9e0 add support for identifying bitcode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36845 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:30:10 +00:00
Chris Lattner
18a4c74136 remove extraneous type qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36679 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 18:14:56 +00:00
Chris Lattner
7cf67dfb6a remove extraneous top-level semi's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36678 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 18:13:15 +00:00
Chris Lattner
ee181bc899 Jeff's fix was fine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36563 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 17:44:10 +00:00
Chris Lattner
9728905481 add missing ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36562 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 17:40:50 +00:00
Jeff Cohen
930c0fead9 Fix MemoryBuffer breakage correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36561 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 14:43:31 +00:00
Chris Lattner
a527bf13a5 new method for creating a path, which does not create a temporary string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36552 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 06:16:32 +00:00
Reid Spencer
947aa7de67 Teach sys::Path how to recognize different kinds of object files for ELF
and Mach-O systems. Additionally, correct the Mach-O logic code to look at
byte 12 not byte 15. Hopefully this fixes the llvm-ld warning on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35876 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 02:02:09 +00:00
Reid Spencer
84c8a9c592 Implement the output inserter for PathWithStatus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35770 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 20:05:10 +00:00
Reid Spencer
2ae9d11b7c For PR1291:
Implement the PathWithStatus class and its use throughout lib/System.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35742 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 18:52:17 +00:00
Reid Spencer
73ca166145 For PR1302:
Make the FileType enumerators more readable and add COFF, ELF and Mach-O.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35649 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-04 06:29:49 +00:00
Reid Spencer
8475ec068c For PR789:
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-29 19:05:44 +00:00
Jeff Cohen
b9681893c8 uniqueID is a uint64_t (caught by VC++)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35465 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 17:28:31 +00:00
Reid Spencer
4031befb62 Add a uniqueID field to the FileStatus structure for Paths. This will map
to the inode number on Unix and something far less unique on Windows. The
windows case needs to be improved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35461 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 17:00:31 +00:00
Reid Spencer
a5cb38980b Don't forget to delete the FileStatus structure on destruction of Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35459 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 16:50:49 +00:00
Reid Spencer
69cce815e7 For PR789:
* Add a method: bool isAbsolute() const, which determines if the path name
  is absolute or not.
* Implement caching of file status information in the Path object. Allow it
  to be updated forcefully or lazily re-fetched from the cached value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35456 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 16:43:20 +00:00
Anton Korobeynikov
c6551ffdd5 Implement PR1240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34959 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 05:32:48 +00:00
Anton Korobeynikov
9ba8a76f8b Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34349 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 19:11:07 +00:00
Anton Korobeynikov
fd58e6e2ec Moved disassembler to libSystem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33461 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-23 10:26:08 +00:00
Jeff Cohen
d41b30def3 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 19:31:28 +00:00
Chris Lattner
c19bbba7d7 make optional pointer really optional
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29904 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 07:11:54 +00:00
Reid Spencer
0554575567 For PR797:
Make the Win32 code exception free (untested/uncompiled) which forced some
interface changes which had ripple effect. This should be the last of 797.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29884 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 21:37:17 +00:00
Reid Spencer
99655e16a6 For PR797:
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-25 19:54:53 +00:00
Reid Spencer
51c5a286ba For PR797:
Final removal of exceptions from lib/System and adjustment of users to
accommodate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29846 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 20:34:57 +00:00
Reid Spencer
cc2e0845c3 Fix constructor documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29845 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 17:43:20 +00:00
Reid Spencer
5a060775da For PR797:
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-23 07:30:48 +00:00
Reid Spencer
142ca8e818 For PR797:
Remove exception throwing from Path::getDirectoryContents and its users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29841 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 06:56:27 +00:00
Reid Spencer
e5c9cb5eb6 For PR797:
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-23 00:39:35 +00:00
Reid Spencer
e1647f4698 For PR797:
Change the Path::make*OnDisk methods exception free and adjust their usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29836 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 23:27:23 +00:00
Reid Spencer
487447626c Make the sys::Path::GetTemporaryDirectory method not throw exceptions and
adjust users of it to compensate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29831 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 19:01:30 +00:00
Reid Spencer
9a2b7c91cb Fix some indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29825 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 17:38:05 +00:00
Reid Spencer
6d045fcdcd For PR797:
Make MappedFile not throw any exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29816 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 16:04:22 +00:00
Reid Spencer
d2a8e656c5 For PR797:
Change interface for error recovery without exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29789 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 06:00:58 +00:00
Reid Spencer
023fcf9776 For PR797:
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 02:04:43 +00:00
Chris Lattner
0d167276dd Remove some now-dead methods. Use getFileStatus instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:16:02 +00:00