diff options
Diffstat (limited to 'lldb/source/Host/common/FileCache.cpp')
-rw-r--r-- | lldb/source/Host/common/FileCache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Host/common/FileCache.cpp b/lldb/source/Host/common/FileCache.cpp index b4629255c85..0e4a05a8c7f 100644 --- a/lldb/source/Host/common/FileCache.cpp +++ b/lldb/source/Host/common/FileCache.cpp @@ -10,6 +10,7 @@ #include "lldb/Host/FileCache.h" #include "lldb/Host/File.h" +#include "lldb/Host/FileSystem.h" using namespace lldb; using namespace lldb_private; @@ -25,13 +26,12 @@ FileCache &FileCache::GetInstance() { lldb::user_id_t FileCache::OpenFile(const FileSpec &file_spec, uint32_t flags, uint32_t mode, Status &error) { - std::string path(file_spec.GetPath()); - if (path.empty()) { + if (!file_spec) { error.SetErrorString("empty path"); return UINT64_MAX; } FileSP file_sp(new File()); - error = file_sp->Open(path.c_str(), flags, mode); + error = FileSystem::Instance().Open(*file_sp, file_spec, flags, mode); if (file_sp->IsValid() == false) return UINT64_MAX; lldb::user_id_t fd = file_sp->GetDescriptor(); |