Chris Lattner
b56e07e736
add a helper method to sys::Path for clang, patch by
...
Kovarththanan Rajaratnam!
llvm-svn: 54655
2008-08-11 23:39:47 +00:00
Argyrios Kyrtzidis
06f0d441f7
Minor comment fix.
...
llvm-svn: 52312
2008-06-16 10:14:09 +00:00
Argyrios Kyrtzidis
2cc0abf260
Fix the sys::Path::getSuffix() implementation.
...
llvm-svn: 52288
2008-06-15 15:15:19 +00:00
Nick Lewycky
c38c1712f7
Make constructors target-specific. This fixes problems where the path would
...
include backslashes on Windows. This should fix llvm-ld problems on win32.
llvm-svn: 50960
2008-05-11 17:37:40 +00:00
Nick Lewycky
25f08069ae
Fix renamePathOnDisk on Win32, patch from David Leon. This fixes problems with
...
llvm-ar being unable to rename files.
llvm-svn: 50702
2008-05-06 03:42:21 +00:00
Ted Kremenek
a518bb79b1
Make getDirnameSep a static method (not part of Path's interface).
...
llvm-svn: 49354
2008-04-07 22:01:32 +00:00
Ted Kremenek
c042bf1db5
Added method Path::getDirname().
...
llvm-svn: 49352
2008-04-07 21:53:57 +00:00
Chris Lattner
3089e1d82e
Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
...
llvm-svn: 49030
2008-04-01 06:00:12 +00:00
Chris Lattner
4dec91222a
remove extraneous namespace qualifier, PR2142
...
llvm-svn: 48327
2008-03-13 05:17:59 +00:00
Chris Lattner
e209be4985
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
6fca938971
Add path separator support, patch by Sam Bishop.
...
llvm-svn: 47662
2008-02-27 06:17:10 +00:00
Dan Gohman
70de4cb1cd
Use empty() instead of comparing size() with zero.
...
llvm-svn: 46514
2008-01-29 13:02:09 +00:00
Chris Lattner
f3ebc3f3d2
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Anton Korobeynikov
2ffb2c9e59
Unbreak mingw build
...
llvm-svn: 45314
2007-12-22 14:26:49 +00:00
Ted Kremenek
14020706d8
Added "GetCurrentDirectory()" to sys::Path.
...
llvm-svn: 45182
2007-12-18 22:07:33 +00:00
Ted Kremenek
74db04261b
Added "isDirectory" method to llvm::sys::Path.
...
llvm-svn: 45168
2007-12-18 19:46:22 +00:00
Gabor Greif
24027b584f
finishing touches of bytecode -> bitcode changes. also unbreak Windows
...
llvm-svn: 37950
2007-07-06 20:28:40 +00:00
Chris Lattner
4a4499b69e
pull some win32 code into common code, add bitcode identification support.
...
llvm-svn: 36846
2007-05-06 05:32:21 +00:00
Jeff Cohen
79582366e5
Unbreak VC++ build.
...
llvm-svn: 35751
2007-04-07 20:47:27 +00:00
Reid Spencer
ceeb918dd1
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
200c6f9c3d
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
60c5522467
Determine absolute paths the correct way :)
...
llvm-svn: 35464
2007-03-29 17:27:38 +00:00
Reid Spencer
d394617a55
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
0f92f0e519
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
Jeff Cohen
7d6f3db3e2
Unbreak VC++ build.
...
llvm-svn: 31464
2006-11-05 19:31:28 +00:00
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
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
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
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
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
7e73c51351
Update for changes in Path class interface for exception removal.
...
llvm-svn: 29834
2006-08-22 22:46:39 +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
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
Reid Spencer
36bc2b00eb
Squelch a warning about signed/unsigned.
...
llvm-svn: 28729
2006-06-08 18:08:43 +00:00
Reid Spencer
5e91c03fa9
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
7c77323e1d
For PR798:
...
Add support for Graphviz. Patch contributed by Anton Korobeynikov.
llvm-svn: 28684
2006-06-05 15:44:46 +00:00
Jeff Cohen
04196acdcb
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
71c2e0f262
Mingw32 patches supplied by Anton Korobeynikov.
...
llvm-svn: 28023
2006-04-29 18:41:44 +00:00
Jeff Cohen
0aad91acfe
Fix bugs also fixed in Unix version, plus other general cleanup.
...
llvm-svn: 22363
2005-07-09 18:42:49 +00:00
Reid Spencer
2d85f5697d
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
Jeff Cohen
f50677610f
Stamp out tabs
...
llvm-svn: 22357
2005-07-08 05:02:13 +00:00
Jeff Cohen
0e1d7354b7
Make Win32 implementation conform to new paradigm
...
llvm-svn: 22356
2005-07-08 04:50:08 +00:00
Reid Spencer
af48d8643d
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
215db9041b
Fix VC++ breakage
...
llvm-svn: 22353
2005-07-08 02:48:42 +00:00
Reid Spencer
17c1bd372a
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