summaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/FileSystem.cpp
AgeCommit message (Collapse)Author
2018-11-10Extract construction of DataBufferLLVM into FileSystemJonas Devlieghere
This moves construction of data buffers into the FileSystem class. Like some of the previous refactorings we don't translate the path yet because the functionality hasn't been landed in LLVM yet. Differential revision: https://reviews.llvm.org/D54272 llvm-svn: 346598
2018-11-09Revert "[FileSystem] Make use of FS in TildeExpressionResolver"Jonas Devlieghere
The whole point of this change was making it possible to resolve paths without depending on the FileSystem, which is not what I did here. Not sure what I was thinking... llvm-svn: 346466
2018-11-09[FileSystem] Make use of FS in TildeExpressionResolverJonas Devlieghere
In order to call real_path from the TildeExpressionResolver we need access to the FileSystem. Since the resolver lives under utility we have to pass in the FS. llvm-svn: 346457
2018-11-08[FileSystem] Add convenience method to check for directories.Jonas Devlieghere
Replace calls to LLVM's is_directory with calls to LLDB's FileSytem class. For this I introduced a new convenience method that, like the other methods, takes either a path or filespec. This still uses the LLVM functions under the hood. Differential revision: https://reviews.llvm.org/D54135 llvm-svn: 346375
2018-11-02[FileSystem] Open File instances through the FileSystem.Jonas Devlieghere
This patch modifies how we open File instances in LLDB. Rather than passing a path or FileSpec to the constructor, we now go through the virtual file system. This is needed in order to make things work with the VFS in the future. Differential revision: https://reviews.llvm.org/D54020 llvm-svn: 346049
2018-11-02[FileSystem] Remove `SetFileSystem` method.Jonas Devlieghere
This is no longer relevant with the new way we initialize the FileSystem. llvm-svn: 346003
2018-11-01[File] Remove static method to get permissions.Jonas Devlieghere
This patch removes the static accessor in File to get a file's permissions. Permissions should be checked through the FileSystem class. llvm-svn: 345901
2018-11-01[FileSystem] Move path resolution logic out of FileSpecJonas Devlieghere
This patch removes the logic for resolving paths out of FileSpec and updates call sites to rely on the FileSystem class instead. Differential revision: https://reviews.llvm.org/D53915 llvm-svn: 345890
2018-11-01[FileSystem] Remove ResolveExecutableLocation() from FileSpecJonas Devlieghere
This patch removes the ResolveExecutableLocation method from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53834 llvm-svn: 345853
2018-11-01[FileSystem] Improve assert and add Terminate in unit test.Jonas Devlieghere
Speculative fix for the Xcode bots where we were seeing the assertion being triggered because we would re-initialize the FileSystem without terminating it. llvm-svn: 345849
2018-11-01[FileSystem] Re-add EnumerateDirectoryJonas Devlieghere
Re-enable EnumerateDirectory now that no_push is available in llvm (r345793). llvm-svn: 345799
2018-10-31[FileSystem] Remove EnumerateDirectoryJonas Devlieghere
The new implementation of EnumerateDirectory relies on `::no_push()` being implemented for the VFS recursive directory iterators. However this patch (D53465) hasn't been landed yet. llvm-svn: 345787
2018-10-31[FileSystem] Extend file system and have it use the VFS.Jonas Devlieghere
This patch extends the FileSystem class with a bunch of functions that are currently implemented as methods of the FileSpec class. These methods will be removed in future commits and replaced by calls to the file system. The new functions are operated in terms of the virtual file system which was recently moved from clang into LLVM so it could be reused in lldb. Because the VFS is stateful, we turned the FileSystem class into a singleton. Differential revision: https://reviews.llvm.org/D53532 llvm-svn: 345783
2017-03-20Delete LLDB's MD5 code. Use LLVM instead.Zachary Turner
Differential Revision: https://reviews.llvm.org/D31108 llvm-svn: 298325
2017-03-20Add a function to MD5 a file's contents.Zachary Turner
In doing so, clean up the MD5 interface a little. Most existing users only care about the lower 8 bytes of an MD5, but for some users that care about the upper and lower, there wasn't a good interface. Furthermore, consumers of the MD5 checksum were required to handle endianness details on their own, so it seems reasonable to abstract this into a nicer interface that just gives you the right value. Differential Revision: https://reviews.llvm.org/D31105 llvm-svn: 298322
2016-11-01Remove TimeValue usage from FileSpec.hPavel Labath
Summary: The only usage there was in GetModificationTime(). I also took the opportunity to move this function from FileSpec to the FileSystem class - since we are using FileSpecs to also represent remote files for which we cannot (easily) retrieve modification time, it makes sense to make the decision to get the modification time more explicit. The new function returns a llvm::sys::TimePoint<>. To aid the transition from TimeValue, I have added a constructor to it which enables implicit conversion from a time_point. Reviewers: zturner, clayborg Subscribers: mehdi_amini, tberghammer, danalbert, beanz, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25392 llvm-svn: 285702
2016-09-06*** This commit represents a complete reformatting of the LLDB source codeKate Stone
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
2015-02-25Add qModuleInfo request in order to get module information (uuid, triple,..) ↵Oleksiy Vyalov
by module path from remote platform. http://reviews.llvm.org/D7709 llvm-svn: 230556
2015-02-20Introduce FileSystem::CalculateMD5AsString that supports any platform and ↵Oleksiy Vyalov
make existing FileSystem::CalculateMD5 to use it. http://reviews.llvm.org/D7771 llvm-svn: 230036