1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

312 Commits

Author SHA1 Message Date
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
Reid Spencer
353b72a7c0 Make the sys::Path::GetTemporaryDirectory method not throw exceptions and
adjust users of it to compensate.

llvm-svn: 29831
2006-08-22 19:01:30 +00:00
Reid Spencer
0c560865ef Don't throw needlessly. Failure of gettimeofday is *very* unlinkely so
just return MinTime if that should ever happen.

llvm-svn: 29826
2006-08-22 17:38:44 +00:00
Reid Spencer
9fbfd7c399 For PR797:
Make MappedFile not throw any exceptions.

llvm-svn: 29816
2006-08-22 16:04:22 +00:00
Reid Spencer
74980b5115 For PR797:
Fix a bug in my last patch that botched file redirection by using explicit
scoping of if statements.

llvm-svn: 29815
2006-08-22 15:56:52 +00:00
Reid Spencer
0d39935a51 Make an error message a little more intelligible.
llvm-svn: 29808
2006-08-22 05:28:38 +00:00
Reid Spencer
e9f818b95a For PR797:
Remove all exception code from Program.inc and implement its new interface
with an ErrMsg string argument.

llvm-svn: 29790
2006-08-21 06:02:44 +00:00
Reid Spencer
5ed787710d 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.

llvm-svn: 29785
2006-08-21 02:04:43 +00:00
Reid Spencer
d06ae031ce Remove extraneous #include.
llvm-svn: 29541
2006-08-07 05:36:24 +00:00
Reid Spencer
b1b1f483ed Make the removal of files use Path::eraseFromDisk just like it does for
the removal of directories. Using std::remove is indiscriminate and can
lead to the removal of things like /dev/null if run as root. The
Path::eraseFromDisk method ensures that we only ever remove regular files
or directories, but never character or block special nodes.  This should
clear up the problem with usage like: llvm-as -o /dev/null which is used
in the llvm-test makefiles.

llvm-svn: 29540
2006-08-07 05:34:08 +00:00
Reid Spencer
ec2ce4eaab Add a note about how the "isFile" check in Path::eraseFromDisk prevents
the erasure of non-file paths like /dev/null.

llvm-svn: 29539
2006-08-07 05:20:05 +00:00
Reid Spencer
982a99456c Update the auto* tools: autoconf 2.60, libtool 1.5.22, automake 1.9.6.
Update ltld.[ch] to version 1.5.22.
Correct the notes about updating these tools (autoconf/README.TXT)
Add configure options for getting the correct option for including a whole
archive when linking.

llvm-svn: 29529
2006-08-04 18:18:08 +00:00
Chris Lattner
ceecdbc08e Remove some now-dead methods. Use getFileStatus instead.
llvm-svn: 29447
2006-08-01 18:16:02 +00:00
Chris Lattner
401b6d696e Use getFileStatus instead of Path::isDirectory().
llvm-svn: 29443
2006-08-01 17:59:14 +00:00
Chris Lattner
863cb9ca93 elimiante some syscalls
llvm-svn: 29442
2006-08-01 17:51:09 +00:00
Anton Korobeynikov
e8ec56dea9 Minor fix due to recent API changes
llvm-svn: 29428
2006-08-01 08:07:22 +00:00
Chris Lattner
504adc58b7 Modify setStatusInfoOnDisk to not throw an exception.
llvm-svn: 29402
2006-07-28 22:36:17 +00:00
Chris Lattner
e2c3df81b7 Update win32 for Path::getStatusInfo
llvm-svn: 29401
2006-07-28 22:32:09 +00:00
Chris Lattner
d7873a0757 Modify Path::eraseFromDisk to not throw an exception.
llvm-svn: 29400
2006-07-28 22:29:50 +00:00
Chris Lattner
f4c7ceebaf Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.

llvm-svn: 29395
2006-07-28 22:03:44 +00:00
Chris Lattner
2cd0f41681 Fix the build on win32
llvm-svn: 29302
2006-07-26 20:37:11 +00:00
Reid Spencer
c2eb650e39 For PR780:
Put the rest of lib/System into LinkAllVMCore.h. This makes all of
lib/System available to programs that #include LinkALlVMCore.h so that
loadable modules linked into those programs can depend on all of lib/System
being available.

llvm-svn: 29288
2006-07-26 16:55:39 +00:00
Reid Spencer
10b9edbb69 For PR780:
1. Move IncludeFile.h to System library
2. Move IncludeFile.cpp to System library
3. #1 and #2 required to prevent cyclic library dependencies for libSystem
4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h
5. Add IncludeFile support to various lib/System classes.
6. Add new lib/System classes to LinkAllVMCore.h
All this in an attempt to pull in lib/System to what's required for VMCore

llvm-svn: 29287
2006-07-26 16:18:00 +00:00
Chris Lattner
4854a2a120 simple optimization: don't bother calling "exists" (which calls the syscall
"access").  Instead, just let the open call fail if the file doesn't exist.
This reduces the # syscalls executed.

llvm-svn: 29173
2006-07-18 07:07:51 +00:00
Chris Lattner
c373ed8521 Remove a dead conditional: info_ can only be allocated if FD is good. Improve
spacing

llvm-svn: 29172
2006-07-18 07:03:14 +00:00
Chris Lattner
1c12ee4323 The only entry in the stat buf this code cares about is the size. Keep just
the size, not the whole stat buffer.

llvm-svn: 29171
2006-07-18 07:01:08 +00:00
Chris Lattner
33501c24e8 Reduce code in the error path by only allocating info_ if everything looks
good.

llvm-svn: 29170
2006-07-18 06:57:51 +00:00
Chris Lattner
d01158a404 Unindent some code
llvm-svn: 29169
2006-07-18 06:52:52 +00:00
Chris Lattner
803c609c77 Turn an if into an else if.
llvm-svn: 29129
2006-07-12 22:37:18 +00:00
Chris Lattner
0438b0c461 no need to do a stat then an lstat. lstat will tell us if normal files don't exist.
llvm-svn: 29068
2006-07-07 21:21:06 +00:00
Chris Lattner
d6b9711d8a Move << method out of line.
llvm-svn: 29062
2006-07-07 18:11:32 +00:00
Chris Lattner
8116948fa5 Change AllocateRWX/DeallocateRWX to not throw an exception.
llvm-svn: 29058
2006-07-07 17:32:37 +00:00
Chris Lattner
12dae23804 Fix this impl
llvm-svn: 29055
2006-07-07 17:26:47 +00:00
Chris Lattner
afbae9010f Add a helper function
llvm-svn: 29049
2006-07-07 17:13:10 +00:00
Chris Lattner
832e60566f Change LoadLibraryPermanently to not throw an exception.
llvm-svn: 29048
2006-07-07 17:12:36 +00:00
Chris Lattner
070ec6bdf6 This uses EH extensively
llvm-svn: 29036
2006-07-07 00:47:29 +00:00
Reid Spencer
82494a2bce Only print the stack trace if it was requested. Previously, any call into
the Signals module that registered the handlers would cause the stack trace
to be generated. Now, you must explicitly call PrintStackTraceOnErrorSignal
in order for that to happen.

llvm-svn: 28810
2006-06-16 00:00:57 +00:00
Evan Cheng
cd37f47980 Don't pull in environ, not always safe. Global variables are bad anyway.
Use execve when explicit environment variables ptr is available. Otherwise
just use execv.

llvm-svn: 28740
2006-06-09 20:43:11 +00:00
Reid Spencer
7451e7b784 Squelch a warning about signed/unsigned.
llvm-svn: 28729
2006-06-08 18:08:43 +00:00
Reid Spencer
aa140d6fef For PR804:
Change the file size field of StatusInfo to be uint64_t instead of size_t
so that we know it is always 64 bits. This prevents some overflow on
systems where size_t is 32 bits when it ought to be 64.

llvm-svn: 28726
2006-06-08 17:00:08 +00:00
Reid Spencer
3c338b3803 For PR787:
Provide new llvm::sys::Program facilities for converting the stdout and
stdin to binary mode. There is no standard way to do this and the available
mechanisms are platform specific. Adjust the bytecode reader and writer to
use these methods when their input is stdin or output is stdout. THis avoids
the problem with \n writing CRLF to a bytecode file on windows.

Patch Contributed by Michael Smith.

llvm-svn: 28722
2006-06-07 23:18:34 +00:00
Reid Spencer
3832b7f9c4 For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.

llvm-svn: 28709
2006-06-07 20:00:19 +00:00