Jim Grosbach
b22ef71d46
On Darwin ARM, memory needs special handling to do JIT. This patch expands
...
this handling to work properly for modifying stub functions, relocations
back to entry points after JIT compilation, etc..
llvm-svn: 57013
2008-10-03 16:17:20 +00:00
Daniel Dunbar
e52e6bfd29
Add llvm::sys::{osName,osVersion} for retrieving operating system name
...
& version as strings.
- Win32 code is untested.
llvm-svn: 56942
2008-10-02 01:17:28 +00:00
Evan Cheng
5cc53c34c3
Preliminary support for systems which require changing JIT memory regions privilege from read / write to read / executable.
...
llvm-svn: 56303
2008-09-18 07:54:21 +00:00
Evan Cheng
7c5dbd95e2
AllocateRWXMemory -> AllocateRWX.
...
llvm-svn: 56244
2008-09-16 17:28:18 +00:00
Chris Lattner
b56e07e736
add a helper method to sys::Path for clang, patch by
...
Kovarththanan Rajaratnam!
llvm-svn: 54655
2008-08-11 23:39:47 +00:00
Devang Patel
cbfc1a4737
Create temp. file in current path.
...
llvm-svn: 53973
2008-07-24 00:35:38 +00:00
Devang Patel
c5552c44a0
While creating temp. file on disk, if the current filename points to a existing directory then create new temp. file inside the directory.
...
llvm-svn: 53929
2008-07-22 20:02:39 +00:00
Seo Sanghyeon
8f7291387f
Fix GetMainExecutable. Patch by Sam Bishop.
...
llvm-svn: 52847
2008-06-27 22:55:30 +00:00
Wojciech Matyjewicz
c6a6618e6a
Add a missing semicolon.
...
llvm-svn: 52290
2008-06-15 18:02:47 +00:00
Argyrios Kyrtzidis
2cc0abf260
Fix the sys::Path::getSuffix() implementation.
...
llvm-svn: 52288
2008-06-15 15:15:19 +00:00
Matthijs Kooijman
1cc695efd7
Fix redirection of stderr in sys::Program::ExecuteAndWait. There was logic
...
error that caused it to redirect stderr to stdout too often.
This fix is applied identically to the win32 code as well, but that is
untested.
--Thi line, and those below, will be ignored--
M System/Unix/Program.inc
M System/Win32/Program.inc
llvm-svn: 52233
2008-06-12 12:53:35 +00:00
Matthijs Kooijman
616e484be4
Make I/O redirection handling in sys::Program a bit more consistent. No
...
functional changes. Win32 code is untested, but should work fine.
In the unix variant, rename RedirectFD to RedirectIO and let that function
handle empty and null paths instead of doing that in the caller 3 times. This
is the same as win32 already does it.
In the win32 variant, use Path::isEmpty() instead of checking the resulting
c_str() manually. This is the same as unix already does it.
llvm-svn: 52230
2008-06-12 10:47:18 +00:00
Bill Wendling
9cfdac50f1
Unbreak build.
...
llvm-svn: 51709
2008-05-29 22:02:08 +00:00
Bill Wendling
33e396d041
Remove more iostream header includes. Needed to implement a "FlushStream"
...
function to flush a specified std::ostream.
llvm-svn: 51705
2008-05-29 21:46:33 +00:00
Dan Gohman
4e974ab933
Make PreVerifyID, IntSigsEnd, and KillSigsEnd const.
...
llvm-svn: 51088
2008-05-14 00:42:30 +00:00
Dan Gohman
d78c400b5b
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Nick Lewycky
c38c1712f7
Make constructors target-specific. This fixes problems where the path would
...
include backslashes on Windows. This should fix llvm-ld problems on win32.
llvm-svn: 50960
2008-05-11 17:37:40 +00:00
Evan Cheng
86cb31862f
Fix more -Wshorten-64-to-32 warnings.
...
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Nate Begeman
4840515dff
Restore code to disable crash catcher on older OS X systems
...
llvm-svn: 49568
2008-04-12 00:47:46 +00:00
Dan Gohman
f4bc782495
Make several symbols static.
...
llvm-svn: 49496
2008-04-10 21:11:47 +00:00
Ted Kremenek
a518bb79b1
Make getDirnameSep a static method (not part of Path's interface).
...
llvm-svn: 49354
2008-04-07 22:01:32 +00:00
Ted Kremenek
c042bf1db5
Added method Path::getDirname().
...
llvm-svn: 49352
2008-04-07 21:53:57 +00:00
Ted Kremenek
1d0436cdb0
Re-implemented Path::createDirectoryOnDisk (for Unix).
...
This method allows one to create a directory, and optionally create all parent
directories that do not exist.
The original implementation would require that *all* directories along a path
are writable by the user, including directories that already exist. For example,
suppose we wanted to create the directory "/tmp/foo/bar", and the directory
"/tmp" already exists, but not "/tmp/foo". Since "/tmp" is writable by all
users, the original implementation would work, and create "/tmp/foo", followed
by "/tmp/bar".
A problem occurred, however if one wanted to created the directory
"/Users/myuser/bar" (or equivalently "/home/myuser/bar"), and "/Users/myuser"
already existed and is writable by the current user. The directory
"/User/myuser" is writable by the user, but "/User" is not. The original
implementation of createDirectoryOnDisk would return with failure since "/User"
is not writable, even though "/User/mysuser" is writable.
The new implementation works by recursively creating parents as needed, and thus
doesn't need to check the permissions on every directory in a path.
llvm-svn: 49162
2008-04-03 16:11:31 +00:00
Chris Lattner
ba98fca5e5
add some #includes.
...
llvm-svn: 49036
2008-04-01 06:25:23 +00:00
Chris Lattner
18356d8857
MappedFile is dead, remove it.
...
llvm-svn: 49035
2008-04-01 06:20:44 +00:00
Chris Lattner
4c5e15f7da
Implement Path::MapInFilePages/UnMapFilePages on unix, which
...
provides fast MappedFile::getFile for large files.
llvm-svn: 49034
2008-04-01 06:16:24 +00:00
Chris Lattner
3089e1d82e
Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
...
llvm-svn: 49030
2008-04-01 06:00:12 +00:00
Chris Lattner
64959dcf03
Make MappedFile::map return a const correct pointer, don't leak address space on Unix platforms.
...
llvm-svn: 49026
2008-04-01 03:49:38 +00:00
Chris Lattner
62385ba3a0
Remove MappedFile support for mapping files for write and exec
...
and shared. This complicates the design, is not used, and probably
doesn't even work.
llvm-svn: 49022
2008-04-01 03:10:22 +00:00
Chris Lattner
efecfbc113
cleanup the MappedFile API and comments. This removes and updates
...
tons of out of date comments (really nothing throws here!) and fixes
some other fairly glaring issues: "size" used to return the size of
the file *and* change it, depending on how you called it.
llvm-svn: 49009
2008-04-01 00:53:25 +00:00
Nate Begeman
f8be3836e3
Actually disable crash reporting on Mac OS X, returning bugpoint to speedy
...
crash miscompilations.
llvm-svn: 49000
2008-03-31 22:19:25 +00:00
Owen Anderson
c905fe9407
Revert r48676. I had plans for using it, but now it's just dead code.
...
llvm-svn: 48743
2008-03-24 21:29:58 +00:00
Owen Anderson
5b993fd70d
Add a comment, and fix a bug where AllocateRW recurred to AllocateRWX instead of itself.
...
llvm-svn: 48677
2008-03-22 02:59:54 +00:00
Owen Anderson
c1e4e3e9a1
Add an AllocateRW to match AllocateRWX.
...
llvm-svn: 48676
2008-03-22 02:33:53 +00:00
Dan Gohman
026eed69e7
Avoid calling array_endof in a static initializer, as it incurs
...
dynamic initialization.
llvm-svn: 48666
2008-03-21 23:44:21 +00:00
Chris Lattner
02e727ff88
Fix Path::GetMainExecutable on cygwin, patch by Sam Bishop.
...
llvm-svn: 48328
2008-03-13 05:22:05 +00:00
Chris Lattner
e209be4985
Stub out a Path::GetMainExecutable call to find the path to the
...
main executable of a program. This needs to be implemented on windows.
llvm-svn: 47835
2008-03-03 02:55:43 +00:00
Chris Lattner
6fca938971
Add path separator support, patch by Sam Bishop.
...
llvm-svn: 47662
2008-02-27 06:17:10 +00:00
Lauro Ramos Venancio
eab51d3a04
It is not safe to call fork in PrintStackTrace. Sometimes it freezes the program.
...
llvm-svn: 47161
2008-02-15 18:05:54 +00:00
Devang Patel
3d4f1b3695
Set error message.
...
Patch by Shantonu Sen.
llvm-svn: 46715
2008-02-04 20:57:54 +00:00
Chris Lattner
f3ebc3f3d2
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Ted Kremenek
14020706d8
Added "GetCurrentDirectory()" to sys::Path.
...
llvm-svn: 45182
2007-12-18 22:07:33 +00:00
Ted Kremenek
74db04261b
Added "isDirectory" method to llvm::sys::Path.
...
llvm-svn: 45168
2007-12-18 19:46:22 +00:00
Chris Lattner
5c62ba5fb8
Remove dead file and directory.
...
llvm-svn: 44720
2007-12-08 22:17:33 +00:00
Dan Gohman
58c468fb09
Remove spurious consts. This fixes warnings with compilers that
...
are strict about such things.
llvm-svn: 41956
2007-09-14 20:08:19 +00:00
Owen Anderson
e2f23a3abf
Add lengthof and endof templates that hide a lot of sizeof computations.
...
Patch by Sterling Stein!
llvm-svn: 41758
2007-09-07 04:06:50 +00:00
Gabor Greif
0e21980704
Solaris 2.x does not have RLIMIT_RSS, check for this symbol (analog NetBSD below), should subsume Cygwin
...
llvm-svn: 37939
2007-07-06 10:31:27 +00:00
Gabor Greif
e16561cd5d
Here is the bulk of the sanitizing.
...
Almost all occurrences of "bytecode" in the sources have been eliminated.
llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Devang Patel
d609374ab3
Fix LLVM build on NetBSD. Patch by Neil Booth.
...
llvm-svn: 37410
2007-06-04 15:28:57 +00:00
Chris Lattner
fd96905f12
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