Commit Graph

119 Commits

Author SHA1 Message Date
Alkis Evlogimenos
07941b493d Fix a bug where directory names of length one or less where not set
properly (examples: "", ".", "a").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18883 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:41:35 +00:00
Reid Spencer
732f92d56e * Add a std::ostream inserter for sys::Path
* Correct the std::string constructor to take a const reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18877 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 06:57:15 +00:00
Reid Spencer
1b6b99bffc For PR351: \
* Remove IsLibrary and GetLibraryPath, replaced by FindLibrary in ../Path.cpp \
* Implement GetSystemLibraryPaths and GetBytecodeLibraryPaths, instead of the \
  GetSystemLibraryPath1 and GetSystemLibraryPath2 methods


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18862 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:00:51 +00:00
Reid Spencer
1fce09125c Path::get -> Path::toString
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 00:14:15 +00:00
Reid Spencer
86ac2dcda1 Fix seriously broken implementation of GetMagicNumber.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18422 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 09:09:48 +00:00
Reid Spencer
be31d2ad78 * Use low-level unix I/O interface since we're on Unix.
* Don't use variable length arrays (replaced with alloca)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17901 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 17:14:08 +00:00
Reid Spencer
b608a81a18 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17872 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:15:19 +00:00
Reid Spencer
2fbf978cb7 Implement functionality suggested from code review: getStatusInfo should
returnn false if the file doesn't exist rather than throw ane exception.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17809 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:30:38 +00:00
Reid Spencer
eaf181550a * Implement getDirectoryContents * Implement getStatusInfo * Implement setStatusInfo * Implement renameFile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17780 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:08:36 +00:00
Reid Spencer
9195f37c5f * Implement getStatusInfo for getting stat(2) like information
* Implement createTemporaryFile for mkstemp(3) functionality
* Fix isBytecodeFile to accept llvc magic # (compressed) as bytecode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17654 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:26:31 +00:00
Reid Spencer
07adb2836b Stop propagating method names that violate the coding standard
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17498 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-05 22:15:36 +00:00
Reid Spencer
622e220ca7 Get rid of file descriptor leak in create_file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16395 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 19:25:11 +00:00
Reid Spencer
0cc2d0a1b8 Allow "bc" as suffix for bytecode files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16381 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-16 16:36:10 +00:00
Reid Spencer
74e7261e90 Implement the GetLibraryPath function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16323 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 00:16:39 +00:00
Reid Spencer
1b554b4583 Implemented support for detecting file types by magic number, stripping
path and suffix to leave basename, and getting the DLL suffix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16289 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-11 04:55:08 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Reid Spencer
f634f46350 Move the GetTemporaryDirectory function from "generic Unix" to platform
specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16119 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-30 21:46:55 +00:00
Reid Spencer
8e66595512 Revise the design of the Path concept per peer review. Too many changes to
note individually but these essence of it is to not derive from
std::string, clarify the interface, and provide better documentation.
There is now also (untested) implementations for AIX, Darwin, and SunOS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16078 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 05:24:01 +00:00
Reid Spencer
b89a2237ea Initial implementation of the Path operating system concept.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16048 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-25 06:20:07 +00:00