Commit Graph

317 Commits

Author SHA1 Message Date
Anton Korobeynikov 6c6a70f999 - 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 9543866c27 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 97c9f20c52 simplify AnalysisGroup registration, eliminating one typeid call.
llvm-svn: 29932
2006-08-28 00:42:29 +00:00
Reid Spencer 50eac3b8ab 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 51e6f68b47 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 b5d6b8f26d 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 dd27929918 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 e4ca722199 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 879ed5ab9c 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 51edba15c6 For PR797:
Remove exception throwing from Path::getDirectoryContents and its users.

llvm-svn: 29841
2006-08-23 06:56:27 +00:00
Reid Spencer 8db844241b 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 a1a7a35267 For PR797:
Adjust code to compensate for Path class interface change.

llvm-svn: 29837
2006-08-22 23:54:35 +00:00
Reid Spencer 9d2f19c7e4 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 7e73c51351 Update for changes in Path class interface for exception removal.
llvm-svn: 29834
2006-08-22 22:46:39 +00:00
Reid Spencer 6ba87bbfd3 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 b1f9935407 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 df1297dd3a For PR797:
Make MappedFile not throw any exceptions.

llvm-svn: 29816
2006-08-22 16:04:22 +00:00
Reid Spencer 8a77bb9815 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 6ad2a91fb3 Make an error message a little more intelligible.
llvm-svn: 29808
2006-08-22 05:28:38 +00:00
Reid Spencer 42bcf6ea76 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 c295914b7a 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 d6f8b1c70a Remove extraneous #include.
llvm-svn: 29541
2006-08-07 05:36:24 +00:00
Reid Spencer 448e2460e0 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 5f9e301521 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 0b52e2f433 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 7dbd783e90 Remove some now-dead methods. Use getFileStatus instead.
llvm-svn: 29447
2006-08-01 18:16:02 +00:00
Chris Lattner 80df7c4651 Use getFileStatus instead of Path::isDirectory().
llvm-svn: 29443
2006-08-01 17:59:14 +00:00
Chris Lattner be119d4386 elimiante some syscalls
llvm-svn: 29442
2006-08-01 17:51:09 +00:00
Anton Korobeynikov 98484fc568 Minor fix due to recent API changes
llvm-svn: 29428
2006-08-01 08:07:22 +00:00
Chris Lattner 60c5064538 Modify setStatusInfoOnDisk to not throw an exception.
llvm-svn: 29402
2006-07-28 22:36:17 +00:00
Chris Lattner 60fbecabf8 Update win32 for Path::getStatusInfo
llvm-svn: 29401
2006-07-28 22:32:09 +00:00
Chris Lattner 3cec109967 Modify Path::eraseFromDisk to not throw an exception.
llvm-svn: 29400
2006-07-28 22:29:50 +00:00
Chris Lattner 4857253d98 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 963ac1486a Fix the build on win32
llvm-svn: 29302
2006-07-26 20:37:11 +00:00
Reid Spencer 082e2a7821 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 421475cd3b 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 9c6c94a806 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 4a5641525d 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 7bc8197032 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 fe5b7fe6d9 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 3eb42b7d14 Unindent some code
llvm-svn: 29169
2006-07-18 06:52:52 +00:00
Chris Lattner 78731ab1b8 Turn an if into an else if.
llvm-svn: 29129
2006-07-12 22:37:18 +00:00
Chris Lattner 0b2890e390 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 9d9cd793a9 Move << method out of line.
llvm-svn: 29062
2006-07-07 18:11:32 +00:00
Chris Lattner 5a9d2e5a0a Change AllocateRWX/DeallocateRWX to not throw an exception.
llvm-svn: 29058
2006-07-07 17:32:37 +00:00
Chris Lattner a75df5e22c Fix this impl
llvm-svn: 29055
2006-07-07 17:26:47 +00:00
Chris Lattner 5df249dfea Add a helper function
llvm-svn: 29049
2006-07-07 17:13:10 +00:00
Chris Lattner 8c8858a6c4 Change LoadLibraryPermanently to not throw an exception.
llvm-svn: 29048
2006-07-07 17:12:36 +00:00
Chris Lattner 814744b22c This uses EH extensively
llvm-svn: 29036
2006-07-07 00:47:29 +00:00
Reid Spencer 57e8e38a6f 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