Chris Lattner
044aaca356
Fix a bug where the bcreader could crash on .bc files that were an exact
...
multiple of the page size, due to a bug in MappedFile
llvm-svn: 36980
2007-05-11 00:00:27 +00:00
Chris Lattner
342010d9f3
pull some win32 code into common code, add bitcode identification support.
...
llvm-svn: 36846
2007-05-06 05:32:21 +00:00
Chris Lattner
1cc146e0ef
silence annoying gcc 4.3 warnings
...
llvm-svn: 36681
2007-05-03 18:15:56 +00:00
Reid Spencer
8d2fd1bc21
Cygwin doesn't have the RSS_LIMIT for get/setrlimit.
...
llvm-svn: 36361
2007-04-23 07:22:51 +00:00
Chris Lattner
2e1f36a4dc
Hack to get sys::Path to recognize macho dylibs.
...
llvm-svn: 35878
2007-04-11 03:15:35 +00:00
Reid Spencer
caf5a6cbd7
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.
llvm-svn: 35876
2007-04-11 02:02:09 +00:00
Reid Spencer
e580735108
Make isDynamicLibrary detect more than just an ELF file.
...
llvm-svn: 35874
2007-04-11 00:49:39 +00:00
Jeff Cohen
d40c15afaa
Unbreak VC++ build.
...
llvm-svn: 35751
2007-04-07 20:47:27 +00:00
Reid Spencer
14fb379888
For PR1291:
...
Implement the PathWithStatus class and its use throughout lib/System.
llvm-svn: 35742
2007-04-07 18:52:17 +00:00
Reid Spencer
e825ec8a72
For PR1302:
...
Implement recognition of COFF, ELF and Mach-O object/shared lib files.
llvm-svn: 35650
2007-04-04 06:30:26 +00:00
Reid Spencer
e35e9d07b0
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.
llvm-svn: 35477
2007-03-29 19:11:22 +00:00
Reid Spencer
4269ae1274
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.
llvm-svn: 35476
2007-03-29 19:05:44 +00:00
Jeff Cohen
6e6a8a9128
Determine absolute paths the correct way :)
...
llvm-svn: 35464
2007-03-29 17:27:38 +00:00
Reid Spencer
d0eb672f1e
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.
llvm-svn: 35461
2007-03-29 17:00:31 +00:00
Reid Spencer
fc67ef7cfe
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.
llvm-svn: 35456
2007-03-29 16:43:20 +00:00
Anton Korobeynikov
62e2448864
Fix mingw32 build
...
llvm-svn: 35177
2007-03-19 20:19:08 +00:00
Anton Korobeynikov
f8f0ce564c
Unbreak mingw32 build
...
llvm-svn: 35042
2007-03-09 11:53:34 +00:00
Anton Korobeynikov
d0375d0852
Implement PR1240
...
llvm-svn: 34959
2007-03-06 05:32:48 +00:00
Jeff Cohen
01cb8d6857
Ensure 64-bit correctness.
...
llvm-svn: 34923
2007-03-05 05:45:08 +00:00
Jeff Cohen
5506bc49f9
Implement memoryLimit on Windows.
...
llvm-svn: 34922
2007-03-05 05:22:08 +00:00
Chris Lattner
241e2e2e3d
fix typo
...
llvm-svn: 34906
2007-03-04 06:36:24 +00:00
Anton Korobeynikov
87e945c62d
Add possibility to set memory limit for binaries run via libSystem. This
...
is especially needed for bugpoint. This partly implements PR688
llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Chris Lattner
51faab4a6f
silence warning
...
llvm-svn: 33746
2007-02-01 04:57:00 +00:00
Anton Korobeynikov
2079992c16
Moved disassembler to libSystem
...
llvm-svn: 33461
2007-01-23 10:26:08 +00:00
Reid Spencer
826ff3f805
For PR808:
...
NetBSD also doesn't have pthread_mutexattr_setpshared
llvm-svn: 33406
2007-01-20 20:44:38 +00:00
Reid Spencer
b2b35908d6
Unbreak Darwin.
...
llvm-svn: 33375
2007-01-19 22:04:24 +00:00
Reid Spencer
2b799d8208
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.
llvm-svn: 33374
2007-01-19 21:41:04 +00:00
Reid Spencer
5d29c5a81b
Handle each of stderr/stdin/stdout separately.
...
llvm-svn: 33373
2007-01-19 21:30:39 +00:00
Reid Spencer
0f61503a7e
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.
llvm-svn: 33064
2007-01-11 00:35:10 +00:00
Reid Spencer
94ddfbe8b8
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.
llvm-svn: 33058
2007-01-10 19:50:43 +00:00
Anton Korobeynikov
ff6535c892
Partly fixed JITing on mingw32 platform. The support is not full due to
...
absence of dllimport JIT codegen.
llvm-svn: 32673
2006-12-19 15:24:18 +00:00
Reid Spencer
5bf28d5efe
Eliminate "control reaches end of non-void function" warnings.
...
llvm-svn: 32225
2006-12-05 17:53:26 +00:00
Jeff Cohen
e1003da1a2
Unbreak VC++ build.
...
llvm-svn: 31464
2006-11-05 19:31:28 +00:00
Reid Spencer
cbea78a1bb
Get rid of unused variable.
...
llvm-svn: 31373
2006-11-02 07:59:59 +00:00
Chris Lattner
7a1210a86c
Use new config.h macro
...
llvm-svn: 30321
2006-09-14 06:21:59 +00:00
Chris Lattner
b233122a83
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.
llvm-svn: 30317
2006-09-14 06:01:41 +00:00
Anton Korobeynikov
1c7d8613c4
- Fixed broken Win32 build
...
- Removed warning about clobbered parameter in Bytecode/Reader
llvm-svn: 30026
2006-09-01 20:35:17 +00:00
Chris Lattner
3530cfb3c3
Guess what happens when asserts are disabled. :(
...
Also, the assert could never fire due to || instead of &&.
llvm-svn: 29977
2006-08-30 20:37:06 +00:00
Chris Lattner
8a59e8be23
simplify AnalysisGroup registration, eliminating one typeid call.
...
llvm-svn: 29932
2006-08-28 00:42:29 +00:00
Reid Spencer
9b5ea0704e
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.
llvm-svn: 29884
2006-08-25 21:37:17 +00:00
Reid Spencer
e2b7b29a82
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%)
llvm-svn: 29882
2006-08-25 19:54:53 +00:00
Reid Spencer
fbc2e180f1
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!
llvm-svn: 29858
2006-08-24 18:58:37 +00:00
Reid Spencer
8dfa2bd161
Turn off exception handling for this library. It no longer throws nor
...
handles exceptions.
llvm-svn: 29847
2006-08-23 20:35:51 +00:00
Reid Spencer
71c3f66dc6
For PR797:
...
Final removal of exceptions from lib/System and adjustment of users to
accommodate.
llvm-svn: 29846
2006-08-23 20:34:57 +00:00
Reid Spencer
bc4c8e8ac0
For PR797:
...
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.
llvm-svn: 29843
2006-08-23 07:30:48 +00:00
Reid Spencer
0bc83e3c5e
For PR797:
...
Remove exception throwing from Path::getDirectoryContents and its users.
llvm-svn: 29841
2006-08-23 06:56:27 +00:00
Reid Spencer
baf54399e7
For PR797:
...
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.
llvm-svn: 29840
2006-08-23 00:39:35 +00:00
Reid Spencer
b447bb61f3
For PR797:
...
Adjust code to compensate for Path class interface change.
llvm-svn: 29837
2006-08-22 23:54:35 +00:00
Reid Spencer
45120b0798
For PR797:
...
Change the Path::make*OnDisk methods exception free and adjust their usage.
llvm-svn: 29836
2006-08-22 23:27:23 +00:00
Reid Spencer
89a87abbff
Update for changes in Path class interface for exception removal.
...
llvm-svn: 29834
2006-08-22 22:46:39 +00:00