Commit Graph

350 Commits

Author SHA1 Message Date
Reid Spencer
2e40d03290 Cygwin doesn't have the RSS_LIMIT for get/setrlimit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36361 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 07:22:51 +00:00
Chris Lattner
ade7592085 Hack to get sys::Path to recognize macho dylibs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 03:15:35 +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
410aa020a2 Make isDynamicLibrary detect more than just an ELF file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35874 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 00:49:39 +00:00
Jeff Cohen
31102896e5 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35751 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 20:47:27 +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
8bb5fd17f9 For PR1302:
Implement recognition of COFF, ELF and Mach-O object/shared lib files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35650 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-04 06:30:26 +00:00
Reid Spencer
1ea733db9d Use the stat information in the Path object, if it is already obtained. This
avoids a call to ::fstat by MappedFile when the file size information was
already obtained by the Path object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 19:11:22 +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
84892be310 Determine absolute paths the correct way :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35464 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 17:27:38 +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
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
d437db1b7b Fix mingw32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35177 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 20:19:08 +00:00
Anton Korobeynikov
349ec1c11b Unbreak mingw32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35042 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 11:53:34 +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
Jeff Cohen
413bc8262e Ensure 64-bit correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34923 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 05:45:08 +00:00
Jeff Cohen
0a18267248 Implement memoryLimit on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34922 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 05:22:08 +00:00
Chris Lattner
8f3acf87a2 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34906 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-04 06:36:24 +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
Chris Lattner
acf8145b62 silence warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33746 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 04:57:00 +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
Reid Spencer
1c7a242358 For PR808:
NetBSD also doesn't have pthread_mutexattr_setpshared


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33406 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 20:44:38 +00:00
Reid Spencer
a867cf0265 Unbreak Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33375 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 22:04:24 +00:00
Reid Spencer
02f20d3d9b Help the lli interpreter find the stderr/stdin/stdout symbols. These are
needed for output to be generated. On Linux these are both global vars and
macro definitions so we have to special case Linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33374 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 21:41:04 +00:00
Reid Spencer
81e3954dc9 Handle each of stderr/stdin/stdout separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33373 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 21:30:39 +00:00
Reid Spencer
65de742b8a Avoid taking the address of a macro by checking to see if stdin is defined
or not. This allows DynamicLibrary.cpp to compile on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33064 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 00:35:10 +00:00
Reid Spencer
11f457aad3 Allow LLI, in interpreter mode, to find stdin, stdout, and stderr. This is
a bit of a hack but it lets some of the llvm-test programs run.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33058 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10 19:50:43 +00:00
Anton Korobeynikov
cd79df01c2 Partly fixed JITing on mingw32 platform. The support is not full due to
absence of dllimport JIT codegen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32673 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 15:24:18 +00:00
Reid Spencer
875fd8fd10 Eliminate "control reaches end of non-void function" warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32225 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 17:53:26 +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
Reid Spencer
2b86b0e95c Get rid of unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31373 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 07:59:59 +00:00
Chris Lattner
5f1d01393c Use new config.h macro
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30321 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 06:21:59 +00:00
Chris Lattner
26b6c0ba5d On Mac OS/X, make Process::PreventCoreFiles disable crash reporter for
the process in addition to disabling core file emission.  This speeds up
bugpoint on default-configured macs by several orders of magnitude.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30317 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 06:01:41 +00:00
Anton Korobeynikov
7d51544903 - Fixed broken Win32 build
- Removed warning about clobbered parameter in Bytecode/Reader


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30026 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 20:35:17 +00:00
Chris Lattner
9b0d6f4ca6 Guess what happens when asserts are disabled. :(
Also, the assert could never fire due to || instead of &&.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29977 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 20:37:06 +00:00
Chris Lattner
a5370172b6 simplify AnalysisGroup registration, eliminating one typeid call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29932 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 00:42:29 +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
30300996b3 For PR797:
Adjust implementation to match the new interface after exception handling
was removed in the Unix verison. NOTE: this hasn't been compiled yet!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29858 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 18:58:37 +00:00
Reid Spencer
4c97bed5d9 Turn off exception handling for this library. It no longer throws nor
handles exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29847 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 20:35:51 +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
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
a34a15765d For PR797:
Adjust code to compensate for Path class interface change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29837 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 23:54: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
cab0e43829 Update for changes in Path class interface for exception removal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29834 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 22:46:39 +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
d8509c95b8 Don't throw needlessly. Failure of gettimeofday is *very* unlinkely so
just return MinTime if that should ever happen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29826 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 17:38:44 +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