1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

403 Commits

Author SHA1 Message Date
Ted Kremenek
1a9c18b50d 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
0dc7a8221d add some #includes.
llvm-svn: 49036
2008-04-01 06:25:23 +00:00
Chris Lattner
4614369b45 MappedFile is dead, remove it.
llvm-svn: 49035
2008-04-01 06:20:44 +00:00
Chris Lattner
3e9e5f498e 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
2e3d2c6ec8 Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
llvm-svn: 49030
2008-04-01 06:00:12 +00:00
Chris Lattner
0ee9b20a1b 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
f2309c208a 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
c3d03d3f10 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
Chris Lattner
a0b425c6bc remove DEFINING_FILE_FOR for MappedFile.h
llvm-svn: 49008
2008-04-01 00:35:55 +00:00
Nate Begeman
68c767cb5c 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
e540be453a 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
de2d3aca1b 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
5654dda62c Add an AllocateRW to match AllocateRWX.
llvm-svn: 48676
2008-03-22 02:33:53 +00:00
Dan Gohman
63ef3bbba0 Avoid calling array_endof in a static initializer, as it incurs
dynamic initialization.

llvm-svn: 48666
2008-03-21 23:44:21 +00:00
Dan Gohman
479c8ef76d 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%.

llvm-svn: 48665
2008-03-21 23:38:23 +00:00
Chris Lattner
c4f8df4a84 this was removed from the Unix side.
llvm-svn: 48370
2008-03-14 20:41:50 +00:00
Devang Patel
2c38efe128 Remove unused GetAddressOfSymbol()
Thanks Daniel Dunbar!

llvm-svn: 48340
2008-03-13 16:55:34 +00:00
Chris Lattner
bc18b99af2 Fix Path::GetMainExecutable on cygwin, patch by Sam Bishop.
llvm-svn: 48328
2008-03-13 05:22:05 +00:00
Chris Lattner
3220bb0859 remove extraneous namespace qualifier, PR2142
llvm-svn: 48327
2008-03-13 05:17:59 +00:00
Chris Lattner
1eca74f70e This is a simple fix for getting error messages from dlerror in
LoadLibraryPermanently. The current code modifies the value of a pointer
that is passed by value, so the caller never gets the message.

Patch by Julien Lerouge!

llvm-svn: 48270
2008-03-12 00:50:01 +00:00
Chris Lattner
5b84600196 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
d2a01e1994 Add path separator support, patch by Sam Bishop.
llvm-svn: 47662
2008-02-27 06:17:10 +00:00
Anton Korobeynikov
ca51f9e5f0 Provide __main hooks for cygwin & mingw32
llvm-svn: 47479
2008-02-22 10:08:31 +00:00
Anton Korobeynikov
9f8c4b85cf Add convenient helper to get suffix of the file
llvm-svn: 47397
2008-02-20 19:41:22 +00:00
Lauro Ramos Venancio
4fcf9513f1 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
8190e4fbe0 Remove use of ltdl
llvm-svn: 47065
2008-02-13 17:11:39 +00:00
Devang Patel
ab8c21f3a1 Set error message.
Patch by Shantonu Sen.

llvm-svn: 46715
2008-02-04 20:57:54 +00:00
Dan Gohman
aad233ea10 Use empty() instead of comparing size() with zero.
llvm-svn: 46514
2008-01-29 13:02:09 +00:00
Anton Korobeynikov
8f635c549c Fix potential buffer overflow
llvm-svn: 46296
2008-01-24 01:20:48 +00:00
Duncan Sands
e97a9a373a Fix compile failures with g++-4.3.
llvm-svn: 45781
2008-01-09 19:42:09 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
8193d4af33 remove attribution from lib Makefiles.
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Anton Korobeynikov
07c828b637 Unbreak mingw build
llvm-svn: 45314
2007-12-22 14:26:49 +00:00
Ted Kremenek
b8c85efce1 Added "GetCurrentDirectory()" to sys::Path.
llvm-svn: 45182
2007-12-18 22:07:33 +00:00
Ted Kremenek
a0ff305551 Added "isDirectory" method to llvm::sys::Path.
llvm-svn: 45168
2007-12-18 19:46:22 +00:00
Chris Lattner
cb4a54fe17 remove obviously dead uses of IncludeFile.
llvm-svn: 45165
2007-12-18 19:15:48 +00:00
Chris Lattner
92a284d220 Remove dead file and directory.
llvm-svn: 44720
2007-12-08 22:17:33 +00:00
Anton Korobeynikov
ad4a61ed0b Provide hook for _alloca to make JITing on Cygwin slightly happier :)
llvm-svn: 44528
2007-12-03 05:30:41 +00:00
Chuck Rose III
b1944d8afb This change does a couple of things. First it gets the Visual Studio builds working.
I added the lexing files to the VStudio projects and removed the .l files from the 
VStudio projects.  There was a problem with use of strtoll in TGLexer.cpp and Chris
suggested switching to strtol, so that's included here.

Additionally, this checkin adds minimal x64 builds to the VStudio builds.  Build issues
related to x64 in the windows specific files for DynamicLibrary.inc and Singals.inc
are worked around, but not ultimately solved.  Binaries used to be stored in

...\win32\{Debug|Release}

but are now kept in

...\win32\bin\{win32|x64}\{Debug|Release}

intermediate files will continue to be stored in the individual project directories under 
win32.  

Some names will likely change in the future to reflect that the vstudio projects
are no longer 32-bit only, but I wanted to get things up and running today so kept away
from bigger restructuring.

llvm-svn: 44260
2007-11-21 00:37:56 +00:00
Bill Wendling
0604e0c00f Silence a warning saying that the variables always resolve to "true" in an
expression.

llvm-svn: 43610
2007-11-01 09:38:19 +00:00
Chris Lattner
920bede750 really fix PR1581, thanks to Daniel Dunbar for pointing
this out.

llvm-svn: 42448
2007-09-28 20:50:50 +00:00
Dan Gohman
53119779c2 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
4b71e55287 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
Chris Lattner
eb42bcd78a Fix PR1581, patch by Timo Savola
llvm-svn: 40616
2007-07-31 06:00:51 +00:00
Gabor Greif
018330fd12 finishing touches of bytecode -> bitcode changes. also unbreak Windows
llvm-svn: 37950
2007-07-06 20:28:40 +00:00
Gabor Greif
f5e225a756 eliminate residual cruft related to recognizing bytecode
files.
bitcode files are the only LLVM format left.

llvm-svn: 37945
2007-07-06 13:38:17 +00:00
Gabor Greif
f9cf3d3440 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
5f705671e4 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
Anton Korobeynikov
c8aa8f8ba7 Provide hook for alloca on VCPP. Patch by Scott Graham
llvm-svn: 37715
2007-06-25 07:12:14 +00:00
Devang Patel
917048baee Fix LLVM build on NetBSD. Patch by Neil Booth.
llvm-svn: 37410
2007-06-04 15:28:57 +00:00