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
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
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
Reid Spencer
d9e9ae6b64
For PR798:
...
Add support for Graphviz. Patch contributed by Anton Korobeynikov.
llvm-svn: 28684
2006-06-05 15:44:46 +00:00
Reid Spencer
b41365509f
Provide configuration support and usage for MINGW32 platform
...
llvm-svn: 28639
2006-06-01 19:03:21 +00:00
Reid Spencer
cf025eb201
For PR786:
...
Turn -pedantic and -Wno-long-long compile flags on by default. In a few
places, avoid the warnings by removing these options in the local makefile.
One notable exception: lib/Target/CBackend/Writer.cpp. These warnings are
left on as a reminder to developers to clean them up.
llvm-svn: 28614
2006-06-01 01:55:21 +00:00
Chris Lattner
d639e0fbce
Bug noticed, by inspection. Filename can be null.
...
llvm-svn: 28292
2006-05-14 19:00:53 +00:00
Chris Lattner
64f0fddc23
This function is not documented as throwing an exception and callers don't
...
handle it. Just silently fail.
llvm-svn: 28291
2006-05-14 18:53:09 +00:00
Chris Lattner
e020b812f3
Fix accidentally committed patch.
...
llvm-svn: 28260
2006-05-12 18:20:39 +00:00
Chris Lattner
acd1bbfff7
Fix iterator invalidation bug, identified by Coverity.
...
llvm-svn: 28257
2006-05-12 18:13:11 +00:00
Jeff Cohen
44ece070c7
Unlike Unix, Windows won't let a file be implicitly replaced via renaming without explicit permission.
...
llvm-svn: 28157
2006-05-07 02:51:51 +00:00
Jeff Cohen
1b3f7b8b48
Mingw32 patches supplied by Anton Korobeynikov.
...
llvm-svn: 28023
2006-04-29 18:41:44 +00:00
Jeff Cohen
4cacdf3a2b
Add checks for __OpenBSD__.
...
llvm-svn: 27761
2006-04-17 17:55:41 +00:00
Reid Spencer
b08854af39
Add the README files to the distribution.
...
llvm-svn: 27651
2006-04-13 06:39:24 +00:00
Reid Spencer
728a2e9f62
Convert llvm.cs.uiuc.edu -> llvm.org
...
llvm-svn: 26748
2006-03-14 05:54:52 +00:00
Jeff Cohen
d80b0d7375
Add AddSymbol() method to DynamicLibrary to work around Windows limitation
...
of being unable to search for symbols in an EXE. It will also allow other
existing hacks to be improved.
llvm-svn: 25805
2006-01-30 04:33:51 +00:00
Jeff Cohen
f8d118706f
Fix indentation.
...
llvm-svn: 25795
2006-01-29 22:02:52 +00:00
Reid Spencer
5086a114a5
For PR351:
...
* Allow the ExecuteAndWait to return negative values if a signal is
detected as the reason for the child termination. This is needed to
support bugpoint detecting bad things in its child processes.
llvm-svn: 24960
2005-12-22 20:00:16 +00:00
Reid Spencer
94bbff0319
Implement a generic polled Alarm function. This merely removes the system
...
dependent portion of the lib/Support/SlowOperationTimer code into the
lib/System implementation where it can be ported to different platforms.
llvm-svn: 24937
2005-12-22 03:23:46 +00:00
Chris Lattner
5c5a7b9193
instead of using mstats, use malloc_zone_statistics which returns numbers
...
that actually make sense.
llvm-svn: 24352
2005-11-14 07:27:56 +00:00
Chris Lattner
d778f6ce06
Teach -track-memory to work on darwin. Looking at sbrk doesn't work because
...
the default allocator uses mmap.
llvm-svn: 24349
2005-11-14 07:00:29 +00:00
Chris Lattner
e6f7a38925
DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
...
llvm-svn: 23940
2005-10-24 02:26:13 +00:00
Chris Lattner
a982e98cb3
Only build .a file versions of these libraries, instead of .a and .o versions.
...
This should speed up build times.
llvm-svn: 23937
2005-10-24 02:11:51 +00:00
Reid Spencer
a1470f81ae
For PR616:
...
These patches make threading optional in LLVM. The configuration scripts are now
modified to accept a --disable-threads switch. If this is used, the Mutex class
will be implemented with all functions as no-op. Furthermore, linking against
libpthread will not be done. Finally, the ParallelJIT example needs libpthread
so its makefile was changed to always add -lpthread to the link line.
llvm-svn: 23003
2005-08-24 10:07:20 +00:00
Misha Brukman
eb3ceda067
Fix grammar: it's == "it is".
...
llvm-svn: 22587
2005-08-02 16:04:59 +00:00
Jeff Cohen
06094b5e91
It's dangerous coding on Mondays.
...
llvm-svn: 22585
2005-08-02 03:26:32 +00:00
Jeff Cohen
82a6b596d0
Implement SetInterruptFunction for Windows.
...
llvm-svn: 22582
2005-08-02 03:04:47 +00:00
Chris Lattner
2ba2324c96
Implement sys::SetInterruptFunction on Unix, stub it on win32 so that the
...
build will not fail
llvm-svn: 22578
2005-08-02 02:14:22 +00:00
Andrew Lenharth
d8bfbd99e9
support near allocations for the JIT
...
llvm-svn: 22554
2005-07-29 23:40:16 +00:00
Reid Spencer
69d45ce28e
Fix a problem in getDirectoryContents where sub-directory names were
...
appended to a path string that didn't end in a slash, yielding invalid
path names.
Path contribute by Nicholas Riley.
llvm-svn: 22539
2005-07-28 16:25:57 +00:00
Jeff Cohen
bd51ec7461
Eliminate all remaining tabs and trailing spaces.
...
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Jeff Cohen
81980781a1
Eliminate tabs and trailing spaces.
...
llvm-svn: 22520
2005-07-27 05:53:44 +00:00
Reid Spencer
ed5ee0f4e8
Don't call pthread_mutexattr_setpshared on FreeBSD because its implementation
...
of pthreads is missing that call (despite it violating the spec).
llvm-svn: 22423
2005-07-13 03:02:06 +00:00
Jeff Cohen
f008a9d1a7
Note to self: don't introduce memory leaks.
...
llvm-svn: 22422
2005-07-13 02:58:04 +00:00
Jeff Cohen
0882aa2a75
Win32 support for Mutex class.
...
llvm-svn: 22420
2005-07-13 02:15:18 +00:00
Reid Spencer
5f037ea395
For PR540:
...
Add a Mutex class for thread synchronization in a platform-independent way.
The current implementation only supports pthreads. Win32 use of Critical
Sections will be added later. The design permits other threading models to
be used if (and only if) pthreads is not available.
llvm-svn: 22403
2005-07-12 15:37:43 +00:00
Jeff Cohen
d1901833d9
Fix bugs also fixed in Unix version, plus other general cleanup.
...
llvm-svn: 22363
2005-07-09 18:42:49 +00:00
Jeff Cohen
32d77a9154
1. Fix bug in getBaseName where it mishandles suffixes
...
2. Fix bug in eraseSuffix where it allows /path/.suffix to become /path/
llvm-svn: 22362
2005-07-09 18:42:02 +00:00
Reid Spencer
0db6c1f252
Ensure that functions like isDirectory don't fail if the file doesn't
...
exist but just return false instead.
llvm-svn: 22361
2005-07-08 17:46:10 +00:00
Reid Spencer
6bed5ca433
Two changes:
...
1. Use isValid() to check validity of the resulting path name in the
eraseSuffix even though we can't think of a case where eraseSuffix could
possibly cause an invalid path name.
2. Rewrite isValid() to not use the deprecated realpath function any more.
It now just uses isascii to make sure all the characters are legit.
llvm-svn: 22359
2005-07-08 06:53:26 +00:00
Jeff Cohen
00f7df2ba0
Stamp out tabs
...
llvm-svn: 22357
2005-07-08 05:02:13 +00:00
Jeff Cohen
2a6a854faf
Make Win32 implementation conform to new paradigm
...
llvm-svn: 22356
2005-07-08 04:50:08 +00:00
Jeff Cohen
fff16d6986
Fix eraseSuffix()
...
llvm-svn: 22355
2005-07-08 04:49:16 +00:00
Reid Spencer
04d734c2f6
Final Changes For PR495:
...
This chagne just renames some sys::Path methods to ensure they are not
misused. The Path documentation now divides methods into two dimensions:
Path/Disk and accessor/mutator. Path accessors and mutators only operate
on the Path object itself without making any disk accesses. Disk accessors
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:
makeReadable -> makeReadableOnDisk
makeWriteable -> makeWriteableOnDisk
makeExecutable -> makeExecutableOnDisk
setStatusInfo -> setStatusInfoOnDisk
createDirectory -> createDirectoryOnDisk
createFile -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy -> eraseFromDisk
rename -> renamePathOnDisk
These changes pass the Linux Deja Gnu tests.
llvm-svn: 22354
2005-07-08 03:08:58 +00:00
Jeff Cohen
abf7ec1fcc
Fix VC++ breakage
...
llvm-svn: 22353
2005-07-08 02:48:42 +00:00
Reid Spencer
a23bbd3854
Changes to mimic those in Unix/Path.inc in support of PR495. This hasn't
...
been compiled or tested.
llvm-svn: 22350
2005-07-07 23:35:23 +00:00
Reid Spencer
5534b2d505
For PR495:
...
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:
appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set
Changes pass Dejagnu and llvm-test/SingleSource tests.
llvm-svn: 22349
2005-07-07 23:21:43 +00:00
Reid Spencer
fb7bca6fa6
For PR495:
...
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute
More (incremental) changes coming to close 495.
llvm-svn: 22345
2005-07-07 18:21:42 +00:00
Reid Spencer
2d5d7084ba
Put in a hack for Cygwin that prevents mkdtemp from being used since
...
configure seems to find it on Cygwin but linking against it fails.
llvm-svn: 22189
2005-06-02 05:38:20 +00:00
Duraid Madina
0cc90e2e4a
comment the hpux bit
...
llvm-svn: 22081
2005-05-16 06:59:53 +00:00
Misha Brukman
f52511fcc6
Remove vim settings from source code; people should use llvm/utils/vim/vimrc
...
llvm-svn: 21704
2005-05-05 22:33:09 +00:00
Alkis Evlogimenos
9594d0b861
Silence gcc-4.0.0 warnings.
...
llvm-svn: 21453
2005-04-22 17:56:01 +00:00
Misha Brukman
933cdaf254
Remove trailing whitespace
...
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Reid Spencer
044ec874d5
Provide an implementation of the GetCurrentUserId and GetCurrentGroupId
...
methods that were recently added to the interface.
llvm-svn: 21401
2005-04-21 16:12:57 +00:00
Reid Spencer
4478133ab0
For Bug 543:
...
Standardize the error messages to be in "path: what failed: why" format.
Also attempt to use the correct errno to ThrowErrno in situations where
the errno value is erased by subsequent system calls.
llvm-svn: 21385
2005-04-21 02:50:10 +00:00
Reid Spencer
c3b52b74cd
For Bug 543:
...
Allow the ThrowErrno function to optionally accept an error number
parameter so that callers can specify the error number to be used.
llvm-svn: 21384
2005-04-21 02:30:32 +00:00
Misha Brukman
7f08d0bc03
Add FIXME by Markus Oberhumer from bug 545: not checking for "." in $PATH may
...
result in returning executable files that won't be runnable.
llvm-svn: 21378
2005-04-20 15:42:11 +00:00
Misha Brukman
11854af05f
Do not mark directories as `executable', we only want program files
...
Patch by Markus Oberhumer.
llvm-svn: 21377
2005-04-20 15:33:22 +00:00
Misha Brukman
4113ed635d
Ignore dangling symlinks in getDirectoryContents()
...
Thanks to Markus Oberhumer for the patch!
llvm-svn: 21370
2005-04-20 04:04:07 +00:00
Jeff Cohen
1b89da675f
Eliminate tabs
...
llvm-svn: 21216
2005-04-11 03:44:22 +00:00
Reid Spencer
a5fbf1d659
Be slightly more accurate in an error message.
...
llvm-svn: 20397
2005-03-02 05:45:56 +00:00
Jeff Cohen
91e04e17a7
Fix silly mistake.
...
llvm-svn: 20256
2005-02-20 02:48:51 +00:00
Jeff Cohen
96558e2f93
Implement standard I/O redirection in ExecuteAndWait().
...
llvm-svn: 20255
2005-02-20 02:43:04 +00:00
Jeff Cohen
b83e650f1f
Change __MINGW to __MINGW32__. Patch submitted by Henrik Bach.
...
llvm-svn: 20243
2005-02-19 03:01:13 +00:00
Jeff Cohen
fa31c775b6
Make PreventCoreFiles() do the right thing on Windows.
...
llvm-svn: 20237
2005-02-18 07:05:18 +00:00
Jeff Cohen
72f7799517
Arg list already has program name in it.
...
llvm-svn: 20208
2005-02-16 04:43:45 +00:00
Chris Lattner
51c55602c9
Fix a bug in my previous change to this, which broke the build on sparcs.
...
llvm-svn: 20184
2005-02-14 21:42:10 +00:00
Chris Lattner
efacfe896c
Fix the llvm bootstrap
...
llvm-svn: 20170
2005-02-13 23:37:09 +00:00
Chris Lattner
535796ff26
If errno is zero strerror_r does not modify the buffer, leaving it unterminated.
...
This causes garbage to be printed out after error messages.
llvm-svn: 20165
2005-02-13 22:46:37 +00:00
Jeff Cohen
1502dd24d9
Fix some Path bugs
...
llvm-svn: 19852
2005-01-27 03:49:03 +00:00
Jeff Cohen
66b5805c50
Fix destroyDirectory bug
...
llvm-svn: 19746
2005-01-22 16:28:33 +00:00
Chris Lattner
e88e660817
Fix bugpoint
...
llvm-svn: 19605
2005-01-16 04:23:22 +00:00
Reid Spencer
ad96095c97
We don't distribute the operating system specific directories any more.
...
llvm-svn: 19563
2005-01-14 22:43:01 +00:00
Jeff Cohen
7dfbb46f7f
Fix and improve win32 path validation.
...
llvm-svn: 19545
2005-01-14 04:09:39 +00:00
Reid Spencer
4e90250e81
Make asctime_r work for HP/UX.
...
llvm-svn: 19544
2005-01-14 00:50:50 +00:00
Reid Spencer
283688b80d
Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the silly
...
gdb debugger doesn't get confused on which file it is reading (the one in
lib/System or the one in lib/System/{Win32,Unix})
llvm-svn: 19426
2005-01-09 23:29:00 +00:00
Jeff Cohen
aef3f70921
Use size_t instead of long to represent memory usage. long is 32 bits
...
on 64-bit Windows.
llvm-svn: 19393
2005-01-08 20:15:57 +00:00
Reid Spencer
110e76fd79
Correct the case of a #include directory name, just in case.
...
llvm-svn: 19254
2005-01-02 09:45:04 +00:00
Jeff Cohen
7466dd37d0
Add functions for determining if the stdin/out/err is connected to a
...
console or not.
llvm-svn: 19236
2005-01-01 22:54:05 +00:00
Reid Spencer
ed2f874a8d
Add functions for determining if the stdin/out/err is connected to a
...
console or not.
llvm-svn: 19233
2005-01-01 22:29:26 +00:00
Jeff Cohen
a46121ed32
Where do these tabs keep coming from???
...
llvm-svn: 19203
2004-12-31 19:03:31 +00:00
Jeff Cohen
9b439381c3
Mostly cleanup, but also some bug fixes, for win32/Path.cpp
...
llvm-svn: 19202
2004-12-31 19:01:08 +00:00
Reid Spencer
7b4b2407c1
Fix a compilation error for the case where mallinfo() is not available.
...
llvm-svn: 19201
2004-12-31 05:53:27 +00:00
Jeff Cohen
01422b3799
Get rid of those nasty tabs...
...
llvm-svn: 19199
2004-12-31 05:07:26 +00:00
Jeff Cohen
82a2c68071
Bring win32/Path.cpp up to date with respect to Unix/Path.cpp
...
llvm-svn: 19198
2004-12-31 04:39:07 +00:00
Jeff Cohen
89e7c7553c
Fix MINGW compilation errors
...
llvm-svn: 19190
2004-12-30 03:02:31 +00:00
Reid Spencer
1c90f8199e
For PR351:
...
* Ensure #includes are wrapped with appropriate HAVE_ guards
* Account for variations in time.h and sys/time.h inclusion.
* Add macros for getting wait(2) exit status correctly (per autoconf sugg.)
* Implement ThrowErrno in terms of strerror_r, strerror or none based on
what is available on the platform.
llvm-svn: 19161
2004-12-27 06:17:50 +00:00
Reid Spencer
73adbe7c2d
For PR351:
...
* Remove redundant #includes that are now in Unix.h
llvm-svn: 19160
2004-12-27 06:17:39 +00:00
Reid Spencer
b454405d4a
For PR351:
...
* Move implementation of sys::PreventCoreFiles function to this file from
the now defunct SysConfig abstraction.
llvm-svn: 19159
2004-12-27 06:17:27 +00:00
Reid Spencer
4d34db1fe6
For PR351:
...
* Ensure #includes are wrapped with appropriate HAVE_ guards
* Ensure variations in "dirent" structure are accounted for.
llvm-svn: 19158
2004-12-27 06:17:15 +00:00
Reid Spencer
537353c09e
For PR351:
...
* Ensure #includes are wrapped with appropriate HAVE_ guards
* Consolidate implementation from operating system specific directory.
llvm-svn: 19157
2004-12-27 06:17:03 +00:00
Reid Spencer
7f7fd13285
For PR351:
...
* Ensure #includes are wrapped with appropriate HAVE_ guards
llvm-svn: 19156
2004-12-27 06:16:52 +00:00
Reid Spencer
3d53c8b8aa
For PR351:
...
* Consolidate implementation for Unix systems into Unix/TimeValue.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19155
2004-12-27 06:16:38 +00:00
Reid Spencer
adaad82e3a
For PR351:
...
* Consolidate implementation for Unix systems into Unix/Program.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19154
2004-12-27 06:16:25 +00:00
Reid Spencer
62ed25388e
For PR351:
...
* Consolidate implementation for Unix systems into Unix/Signals.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19153
2004-12-27 06:16:11 +00:00
Reid Spencer
38ecc1456a
For PR351:
...
* Consolidate implementation for Unix systems into Unix/Memory.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19152
2004-12-27 06:15:57 +00:00
Reid Spencer
75d13b2e49
For PR351:
...
* Consolidate implementation for Unix systems into Unix/MappedFile.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19151
2004-12-27 06:15:43 +00:00
Reid Spencer
ae90b4a287
For PR351:
...
* Consolidate implementation for Unix systems into Unix/Process.cpp
* Avoid use of symbolic link to #include platform-specific implementation.
llvm-svn: 19150
2004-12-27 06:15:29 +00:00
Reid Spencer
7da5e588d4
For PR351:
...
SysConf abstraction was pointless because it had a single function in it that
pertained only to the current process. So merge it into the Process abstraction
and remove the files completely.
llvm-svn: 19149
2004-12-27 06:15:14 +00:00
Jeff Cohen
1f2d9696bf
mingw doesn't support the official debug API.
...
Old versions of the C runtime somehow get loaded into the process. Make
sure they aren't searched for symbols.
llvm-svn: 19141
2004-12-25 04:50:17 +00:00
Jeff Cohen
724ac32c61
Get VC++ building again
...
llvm-svn: 19140
2004-12-24 16:26:47 +00:00
Jeff Cohen
f3543c32a5
Eliminate use of ltdl.c when doing a VC++ build. Because libtool isn't used,
...
ltdl's LGPL license would infect all of LLVM.
llvm-svn: 19137
2004-12-24 07:57:09 +00:00
Reid Spencer
870c0e8f4f
For PR351:
...
Merge implementations of isValid and GetTemporaryDirectory into this file. There
is not any point having the operating system specific files for such little
variation between the Unix family of systems.
llvm-svn: 19134
2004-12-24 06:29:42 +00:00
Reid Spencer
d1a0baa811
For PR351:
...
This implementation is no longer needed, its been merged to Unix/Path.cpp since
there is such little variation between the platforms.
llvm-svn: 19133
2004-12-24 06:29:28 +00:00
Reid Spencer
9cf9b6fe85
For PR351:
...
Use the LLVM_ON_UNIX and LLVM_ON_WIN32 #defines to include the implementation
instead of relying upon the "platform" link
llvm-svn: 19132
2004-12-24 06:29:17 +00:00
Reid Spencer
b1eb2641f3
Resurrect this file.
...
llvm-svn: 19130
2004-12-24 06:03:31 +00:00
Reid Spencer
c2e45f4610
Remove these files as they are not being included any more. DynamicLibrary
...
is now implemented via ltdl.cpp which has its own way of dealing with
the different platforms.
llvm-svn: 19129
2004-12-24 03:59:46 +00:00
Jeff Cohen
916051a9fd
Fix VC++ compilation error
...
llvm-svn: 19124
2004-12-24 02:38:34 +00:00
Reid Spencer
5885a388b8
Put CopyFile in the sys namespace.
...
llvm-svn: 19122
2004-12-23 22:14:32 +00:00
Jeff Cohen
9ffd97b636
Patch to fix mingw compilation problem contributed by Henrik.
...
llvm-svn: 19112
2004-12-23 03:44:40 +00:00
Reid Spencer
17e4392807
Put the CopyFile function explicitly in the sys namespace.
...
llvm-svn: 19079
2004-12-21 03:27:08 +00:00
Reid Spencer
6324bbcd91
Cygwin doesn't like .. through a link, so drop the ..
...
llvm-svn: 19076
2004-12-20 22:21:41 +00:00
Reid Spencer
76147edb0c
Implement GetTimeUsage correctly.
...
llvm-svn: 19074
2004-12-20 21:43:33 +00:00
Reid Spencer
b9376dde14
Provide a getrusage based implementation of GetTotalMemoryUsage and use
...
the ru_maxrss field as an approximation.
llvm-svn: 19072
2004-12-20 16:33:37 +00:00
Reid Spencer
c34325ae5f
Consistently use the same #if style. Also, fix a bug testing for sbrk(3)
...
llvm-svn: 19071
2004-12-20 16:06:44 +00:00
Jeff Cohen
a61823c49e
Keep up with lib/System changes
...
llvm-svn: 19057
2004-12-20 03:24:56 +00:00
Reid Spencer
3f8be49b9e
For PR351:
...
* Implement GetMallocUsage to get usage of malloc heap
* Implement GetMemoryUsage to get total memory usage of process
* Implement GetTimeUsage to get elapsed/user/system time
llvm-svn: 19055
2004-12-20 00:59:28 +00:00
Reid Spencer
82588cf403
For PR351:
...
No need for Unix/SUS/Process.cpp any more, just ifdef it.
llvm-svn: 19054
2004-12-20 00:59:16 +00:00
Misha Brukman
272c37ff7b
* Use "" for LLVM include files, not <>
...
* llvm/Config/alloca.h already #includes config.h
* Minor readability/stylistic changes
llvm-svn: 19048
2004-12-20 00:16:38 +00:00
Misha Brukman
247ee9ee4a
Use <> for system #include files
...
llvm-svn: 19046
2004-12-19 19:27:11 +00:00
Brian Gaeke
63c01d5387
Make references to 'struct sigaction' compile under Solaris.
...
llvm-svn: 19045
2004-12-19 18:58:11 +00:00
Reid Spencer
e377d1308e
For PR351:
...
Move the functionality of RunProgramWithTimeout into the ExecuteAndWait
function: support a timeout and I/O redirects
llvm-svn: 19043
2004-12-19 18:00:44 +00:00
Reid Spencer
5eba1617bf
For PR351:
...
Add a needed include.
llvm-svn: 19042
2004-12-19 18:00:32 +00:00
Jeff Cohen
f6a4f3f347
Fix win32 breakage
...
llvm-svn: 19028
2004-12-18 06:42:15 +00:00
Jeff Cohen
21f0b01731
Expository comment submitted by Henrik Bach
...
llvm-svn: 18976
2004-12-16 04:06:56 +00:00
Reid Spencer
43693c5432
Change the signatures of the destroyFile and destroyDirectory methods to
...
const because they affect the file system, not the Path object.
llvm-svn: 18973
2004-12-15 23:02:10 +00:00
Reid Spencer
c5c37ed49f
Remove the CFE's lib directory from the bytecode path because LLVM should
...
be agnostic to the needs of any specific FE.
llvm-svn: 18969
2004-12-15 22:22:51 +00:00
Reid Spencer
a2d326c825
Remove automatic insertion of CFE's lib directory into the bytecode path
...
because LLVM should be agnostic to the needs of specific front ends.
llvm-svn: 18968
2004-12-15 22:21:42 +00:00
Reid Spencer
9d3a8ad836
Fix a file overwrite bug in llvm-ar introduced by changes to
...
createTemporaryFile semantics where it doesn't create a fully unique name
if the basename doesn't exist. This functionality is now optionally
provided by the boolean reuse_current parameter to createTemporaryFile and
makeUnique. The default values differ because of the way these functions
are used in LLVM.
llvm-svn: 18961
2004-12-15 08:32:45 +00:00
Jeff Cohen
a78192f9b7
Make Win32 TimeValue::toString() re-entrant and work with mingw
...
llvm-svn: 18954
2004-12-15 04:28:44 +00:00
Jeff Cohen
9fd13f9f81
Fix VC++ compilation errors
...
llvm-svn: 18953
2004-12-15 04:08:15 +00:00
Reid Spencer
8fe73b4d39
For PR351:
...
* Fix implementation and documentation about LLVMGCCDIR/bytecode-libs
* Add the makeUnique method, replacement for getUniqueFilename in Support.
* Add the sys::CopyFile function, replacement for CopyFile in Support.
* Move GetLLVMConfigDir() into generic code area since its generic.
llvm-svn: 18947
2004-12-15 01:50:13 +00:00
Reid Spencer
006364762d
Add the getMagicNumber method.
...
Patch contributed by Henrik Bach. Thanks Henrik!
llvm-svn: 18933
2004-12-14 18:42:13 +00:00
Jeff Cohen
cc0adb0271
Implement Win32 Path::getStatusInfo(), TimeValue::toString()
...
llvm-svn: 18930
2004-12-14 05:26:43 +00:00
Reid Spencer
4dec8e9e27
For PR351:
...
Implement the new environment pointer for ExecuteAndWait
llvm-svn: 18928
2004-12-14 04:18:51 +00:00
Reid Spencer
5a18b63eb5
For PR351:
...
Implement three new functions to allow setting access/permission bits on
the file referenced by a path. The makeReadable and makeExecutable methods
replace the FileUtilities MakeFileReadable and MakeFileExecutable
functions. The makeWritable function is new and provided for consistency
since Path has a writable() method.
llvm-svn: 18907
2004-12-13 19:59:50 +00:00
Reid Spencer
8fc3e4392e
Genericize implementation of GetDLLSuffix now that we have LTDL_SHLIB_EXT
...
available.
llvm-svn: 18904
2004-12-13 18:41:28 +00:00
Reid Spencer
e98ef91f76
Fix a bug where "." or any single character file name doesn't get the
...
terminating / when setDirectory is called.
llvm-svn: 18886
2004-12-13 07:51:52 +00:00
Reid Spencer
2062d248c7
Remove an always false clause from an if statement.
...
llvm-svn: 18885
2004-12-13 07:51:07 +00:00
Alkis Evlogimenos
72ddb084c4
Fix a bug where directory names of length one or less where not set
...
properly (examples: "", ".", "a").
llvm-svn: 18883
2004-12-13 07:41:35 +00:00
Reid Spencer
24cf14cef6
* Add a std::ostream inserter for sys::Path
...
* Correct the std::string constructor to take a const reference.
llvm-svn: 18877
2004-12-13 06:57:15 +00:00
Jeff Cohen
b2b5f8f969
Fix recent breakage of win32 build
...
llvm-svn: 18876
2004-12-13 06:26:35 +00:00
Reid Spencer
18018b3967
Implement new functions per new interface
...
llvm-svn: 18866
2004-12-13 03:03:42 +00:00
Reid Spencer
dac49a55a1
For PR351: \
...
* Remove IsLibrary and GetLibraryPath, replaced by FindLibrary in ../Path.cpp \
* Implement GetSystemLibraryPaths and GetBytecodeLibraryPaths, instead of the \
GetSystemLibraryPath1 and GetSystemLibraryPath2 methods
llvm-svn: 18862
2004-12-13 03:00:51 +00:00
Reid Spencer
38992108f9
For PR351: \
...
* Move generic isArchive method here from Unix/Path.cpp \
* Implement isDynamicLibrary \
* Implement FindLibrary for Linker
llvm-svn: 18861
2004-12-13 03:00:39 +00:00
Reid Spencer
1e51643433
Make the size() method const
...
llvm-svn: 18852
2004-12-13 02:58:51 +00:00
Reid Spencer
e43fb31a1f
Rename Path::get -> Path::toString
...
llvm-svn: 18802
2004-12-11 17:37:01 +00:00
Reid Spencer
e2af9dc813
Path::get -> Path::toString
...
llvm-svn: 18785
2004-12-11 00:14:15 +00:00
Jeff Cohen
2d53514c83
Fix residual Visual Studio build problems
...
llvm-svn: 18688
2004-12-09 05:51:11 +00:00
Chris Lattner
aa0eee9e3e
Make this work with the ICC compiler, contributed by Bjørn Wennberg
...
llvm-svn: 18626
2004-12-08 16:10:52 +00:00
Chris Lattner
66d0cdd8ec
Fix compilation error on Darwin.
...
llvm-svn: 18485
2004-12-04 04:17:20 +00:00
Chris Lattner
c8009d368d
Move darwin-specific majik here.
...
llvm-svn: 18466
2004-12-03 23:02:42 +00:00
Reid Spencer
f16e254d8a
Fix seriously broken implementation of GetMagicNumber.
...
llvm-svn: 18422
2004-12-02 09:09:48 +00:00
Reid Spencer
66b4a250cf
Implement two new functions: LoadLibraryPermanently and
...
SearchForAddressOfSymbol.
llvm-svn: 18355
2004-11-29 13:33:28 +00:00
Reid Spencer
c0b0d036b3
We just use ltdl's implementation for this abstraction now. Its portable to
...
more platforms than LLVM supports.
llvm-svn: 18352
2004-11-29 12:39:10 +00:00
Reid Spencer
e498308615
Mods for compilation with llvm.
...
llvm-svn: 18346
2004-11-29 12:04:27 +00:00
Reid Spencer
42ceb789ad
Original version of ltdl.h from libtool 1.5.10
...
llvm-svn: 18345
2004-11-29 12:02:48 +00:00
Reid Spencer
93069daab2
Original version of ltdl.c from libtool 1.5.10
...
llvm-svn: 18344
2004-11-29 12:02:25 +00:00
Reid Spencer
9e369115fc
Implement the default constructor which causes the current program to be
...
opened as if it was a dynamic library so its symbols can be searched too.
llvm-svn: 18341
2004-11-29 10:39:46 +00:00
Reid Spencer
de847ecdaa
Cast the void* handle data member to HMODULE* to keep the VC++ compiler
...
happy. Thanks to Henrik Bach for pointing this out.
llvm-svn: 18056
2004-11-20 23:30:55 +00:00
Reid Spencer
c1871a4eaa
Dynamic Library abstraction. This makes the abstraction of a single dynamic
...
library (shared library/shared object) whose symbols can be looked up
dynamically. Used for plug-ins.
llvm-svn: 17940
2004-11-18 04:33:39 +00:00
Reid Spencer
24a84793ba
* Use low-level unix I/O interface since we're on Unix.
...
* Don't use variable length arrays (replaced with alloca)
llvm-svn: 17901
2004-11-16 17:14:08 +00:00
Misha Brukman
3885f4ec6d
Erase non-applicable Unix comment, this is Win32
...
llvm-svn: 17896
2004-11-16 07:35:32 +00:00
Reid Spencer
026d2183e7
Remove useless #include.
...
Patch contributed by Jeff Cohen.
llvm-svn: 17891
2004-11-16 07:00:23 +00:00
Reid Spencer
0d16952663
Simplify code.
...
Patch contributed by Jeff Cohen.
llvm-svn: 17890
2004-11-16 06:59:53 +00:00
Reid Spencer
bcef3fef1d
Per code review:
...
* get rid of (void) construct in function declarations
* make toString a const member
* add a default implementation of toString for Win32
llvm-svn: 17873
2004-11-16 06:22:17 +00:00
Reid Spencer
4031ff44bb
Per code review:
...
* Clean up the StatusInfo constructor to construct all members and give
them reasonable values.
* Get rid of the Vector typedef and make the interface to
getDirectoryContent use a std::set instead of a std::vector so the dir
content is sorted.
* Make the getStatusInfo method const and not return a useless boolean.
llvm-svn: 17872
2004-11-16 06:15:19 +00:00
Reid Spencer
247d690431
Provide the ThrowErrno utility.
...
Patch contributed by Morten Ofstad
llvm-svn: 17827
2004-11-15 17:21:57 +00:00
Reid Spencer
238e966215
Adjust implementation to match new interface.
...
Patch provided by Morten Ofstad
llvm-svn: 17826
2004-11-15 17:20:28 +00:00
Reid Spencer
5fc587b13e
Actually get the #include correct so it compiles .. duh.
...
llvm-svn: 17817
2004-11-15 04:47:22 +00:00
Reid Spencer
8d0de0688c
Make it actually compile on Solaris.
...
llvm-svn: 17815
2004-11-15 04:42:44 +00:00
Reid Spencer
2638dac5e9
Consolidate the implementation of TimeValue::now() for Unix to use the
...
seemingly ubiquitous gettimeofday(3) call.
llvm-svn: 17813
2004-11-15 04:36:35 +00:00
Reid Spencer
2012d091b2
Implement functionality suggested from code review: getStatusInfo should
...
returnn false if the file doesn't exist rather than throw ane exception.
llvm-svn: 17809
2004-11-14 23:30:38 +00:00
Reid Spencer
7de5984452
Make sure IdentifyFileType is in the sys namespace.
...
llvm-svn: 17806
2004-11-14 23:26:18 +00:00
Alkis Evlogimenos
a29bf44bde
Add missing include.
...
llvm-svn: 17799
2004-11-14 22:37:42 +00:00
Reid Spencer
542b5216bf
Forget strerror_r, it causes problems. Fix later when threading matters
...
llvm-svn: 17783
2004-11-14 22:10:54 +00:00
Reid Spencer
bd1d413e4e
Implement the toString method
...
llvm-svn: 17782
2004-11-14 22:10:08 +00:00
Reid Spencer
3dfb002523
Update for prototype changes
...
llvm-svn: 17781
2004-11-14 22:09:22 +00:00
Reid Spencer
b73d75e4ff
* Implement getDirectoryContents * Implement getStatusInfo * Implement setStatusInfo * Implement renameFile
...
llvm-svn: 17780
2004-11-14 22:08:36 +00:00
Reid Spencer
59872e60ef
Fix bugs in class invariant
...
llvm-svn: 17779
2004-11-14 22:07:50 +00:00
Reid Spencer
a6b803539a
Include the correct implementation file
...
llvm-svn: 17778
2004-11-14 22:07:04 +00:00
Reid Spencer
85b6b57c5e
Don't exceed 80 columns.
...
llvm-svn: 17777
2004-11-14 22:06:18 +00:00
Reid Spencer
381c80ec88
Implement IdentifyFileType function
...
llvm-svn: 17776
2004-11-14 22:05:32 +00:00
Reid Spencer
d17e35893c
Fix isBytecodeFile to correctly recognized compressed bytecode too.
...
llvm-svn: 17655
2004-11-09 20:27:23 +00:00