aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/FileSystem.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2018-11-12 19:08:19 +0000
committerDavide Italiano <davide@freebsd.org>2018-11-12 19:08:19 +0000
commit9a89d93d62525518faa518766b6fae4d14b26140 (patch)
treea65e0babe3bc9b0b1b0861aa2116784000b7a7c2 /lldb/source/Host/common/FileSystem.cpp
parent163107885339985f576afef02c76978d6b2a2401 (diff)
downloadllvm-9a89d93d62525518faa518766b6fae4d14b26140.zip
llvm-9a89d93d62525518faa518766b6fae4d14b26140.tar.gz
llvm-9a89d93d62525518faa518766b6fae4d14b26140.tar.bz2
Revert "Extract construction of DataBufferLLVM into FileSystem"
It broke the lldb sanitizer bots. llvm-svn: 346694
Diffstat (limited to 'lldb/source/Host/common/FileSystem.cpp')
-rw-r--r--lldb/source/Host/common/FileSystem.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/lldb/source/Host/common/FileSystem.cpp b/lldb/source/Host/common/FileSystem.cpp
index 95b4530..a9ed5bd 100644
--- a/lldb/source/Host/common/FileSystem.cpp
+++ b/lldb/source/Host/common/FileSystem.cpp
@@ -135,16 +135,6 @@ bool FileSystem::IsDirectory(const FileSpec &file_spec) const {
return IsDirectory(file_spec.GetPath());
}
-bool FileSystem::IsLocal(const Twine &path) const {
- bool b;
- m_fs->isLocal(path, b);
- return b;
-}
-
-bool FileSystem::IsLocal(const FileSpec &file_spec) const {
- return IsLocal(file_spec.GetPath());
-}
-
void FileSystem::EnumerateDirectory(Twine path, bool find_directories,
bool find_files, bool find_other,
EnumerateDirectoryCallbackType callback,
@@ -228,34 +218,6 @@ void FileSystem::Resolve(FileSpec &file_spec) {
file_spec.SetIsResolved(true);
}
-std::shared_ptr<DataBufferLLVM>
-FileSystem::CreateDataBuffer(const llvm::Twine &path, uint64_t size,
- uint64_t offset) {
- const bool is_volatile = !IsLocal(path);
-
- std::unique_ptr<llvm::WritableMemoryBuffer> buffer;
- if (size == 0) {
- auto buffer_or_error =
- llvm::WritableMemoryBuffer::getFile(path, -1, is_volatile);
- if (!buffer_or_error)
- return nullptr;
- buffer = std::move(*buffer_or_error);
- } else {
- auto buffer_or_error = llvm::WritableMemoryBuffer::getFileSlice(
- path, size, offset, is_volatile);
- if (!buffer_or_error)
- return nullptr;
- buffer = std::move(*buffer_or_error);
- }
- return std::shared_ptr<DataBufferLLVM>(new DataBufferLLVM(std::move(buffer)));
-}
-
-std::shared_ptr<DataBufferLLVM>
-FileSystem::CreateDataBuffer(const FileSpec &file_spec, uint64_t size,
- uint64_t offset) {
- return CreateDataBuffer(file_spec.GetPath(), size, offset);
-}
-
bool FileSystem::ResolveExecutableLocation(FileSpec &file_spec) {
// If the directory is set there's nothing to do.
const ConstString &directory = file_spec.GetDirectory();