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
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
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
Jeff Cohen
1b89da675f
Eliminate tabs
...
llvm-svn: 21216
2005-04-11 03:44:22 +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
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
Jeff Cohen
7dfbb46f7f
Fix and improve win32 path validation.
...
llvm-svn: 19545
2005-01-14 04:09:39 +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
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
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
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
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
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
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
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
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
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
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
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
e43fb31a1f
Rename Path::get -> Path::toString
...
llvm-svn: 18802
2004-12-11 17:37:01 +00:00
Jeff Cohen
2d53514c83
Fix residual Visual Studio build problems
...
llvm-svn: 18688
2004-12-09 05:51:11 +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
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
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
d17e35893c
Fix isBytecodeFile to correctly recognized compressed bytecode too.
...
llvm-svn: 17655
2004-11-09 20:27:23 +00:00
Reid Spencer
7090e6a875
Stop propagating method names that violate the coding standard
...
llvm-svn: 17498
2004-11-05 22:15:36 +00:00
Reid Spencer
d3c912a7b0
Use __MINGW instead of __MING. Patch contributed by Henrik Bach.
...
llvm-svn: 16970
2004-10-14 03:09:02 +00:00
Reid Spencer
27ae06c1db
Implementation of MappedFile for Win32. Patch provided by Jeff Cohen.
...
llvm-svn: 16968
2004-10-14 03:05:59 +00:00
Reid Spencer
da2e8b9943
First version of the MappedFile abstraction for operating system idependent
...
mapping of files. This first version uses mmap where its available. The
class needs to implement an alternate mechanism based on malloc'd memory
and file reading/writing for platforms without virtual memory.
llvm-svn: 16649
2004-10-04 11:08:32 +00:00
Misha Brukman
8a43086705
That should actually be __MING, not __MINGW.
...
llvm-svn: 16617
2004-09-30 18:28:07 +00:00
Misha Brukman
549b3533be
Check for __MINGW define instead of __MINGW_H, patch by Henrik Bach.
...
llvm-svn: 16615
2004-09-30 18:24:58 +00:00
Reid Spencer
3d434887d4
Improve validity checking of windows path names and fix file creation
...
problems.
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16565
2004-09-29 00:01:17 +00:00
Reid Spencer
6a072ccbb0
Use llvm::sys::Path to destroy the file.
...
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16564
2004-09-28 23:58:03 +00:00
Reid Spencer
e2e85bd507
Win32 implementation of TimeValue::now().
...
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16563
2004-09-28 23:56:20 +00:00
Reid Spencer
78e20a7f60
Added stub implementations of TimeValue concept for remaining platforms.
...
llvm-svn: 16513
2004-09-25 05:03:54 +00:00
Reid Spencer
6210b04509
Patch for MINGW. Patch provided by Henrik Bach.
...
llvm-svn: 16495
2004-09-23 14:47:10 +00:00
Reid Spencer
5eee940491
Minor correction to Signals implementation.
...
Patch submitted by Jeff Cohen. Thanks Jeff!
llvm-svn: 16401
2004-09-19 05:37:39 +00:00
Reid Spencer
fb3c25ded9
Porting of Unix implementation to Win32.
...
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16396
2004-09-18 19:29:16 +00:00
Reid Spencer
fe3656ecc6
Make sure critical sections are entered before trying to leave them.
...
Add some additional commentary about the workings of this module.
Patch contributed by Jeff Cohen. Thanks Jeff!
llvm-svn: 16383
2004-09-17 03:02:27 +00:00
Reid Spencer
c7ed215028
Implement the signals interface for Win32.
...
Patch provided by Jeff Cohen. Thanks Jeff!
llvm-svn: 16380
2004-09-16 15:53:16 +00:00
Reid Spencer
b985bbc08d
Patches to make this file actually compile under windows.
...
Patches submitted by Jeff Cohen. Thanks Jeff!
llvm-svn: 16362
2004-09-15 05:49:50 +00:00
Reid Spencer
f8a8c7dd06
Initial version of the SysConfig abstraction for Win32.
...
llvm-svn: 16361
2004-09-15 05:48:49 +00:00
Reid Spencer
32525ca7db
First version of a common header file for Win32 implementations.
...
llvm-svn: 16360
2004-09-15 05:48:11 +00:00
Reid Spencer
64076f59a3
Initial implementation of the Process abstraction for Win32.
...
llvm-svn: 16359
2004-09-15 05:47:40 +00:00
Reid Spencer
ce7c15737a
Simplify the sys::Memory interface per Chris' request.
...
llvm-svn: 16318
2004-09-13 22:38:11 +00:00
Reid Spencer
6920555959
Provide initial implementations of Memory and Process concepts for various
...
platforms.
Implement GetLLVMSuffix function for the Path concept.
llvm-svn: 16292
2004-09-11 04:59:30 +00:00
Reid Spencer
49f3c9b9ee
Initial platform independent implementation of operating system concept
...
of "Signals" (cleanup after fatal errors).
llvm-svn: 16085
2004-08-29 19:22:48 +00:00
Reid Spencer
159b0103de
Initial commit of an platform-indepdendent implementation for the
...
"Program" operating system concept (find and execute programs).
llvm-svn: 16084
2004-08-29 19:20:41 +00:00