mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
[FileSystem] Open File instances through the FileSystem.
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
This commit is contained in:
1 parent
d1932dcdd3
commit
50bc1ed290
19 files changed
+199
-220
No files matched your search
@@ -10,6 +10,7 @@
|
||||
#include "lldb/API/SBStream.h"
|
||||
|
||||
#include "lldb/Core/StreamFile.h"
|
||||
#include "lldb/Host/FileSystem.h"
|
||||
#include "lldb/Utility/Status.h"
|
||||
#include "lldb/Utility/Stream.h"
|
||||
#include "lldb/Utility/StreamString.h"
|
||||
@@ -70,9 +71,9 @@ void SBStream::RedirectToFile(const char *path, bool append) {
|
||||
open_options |= File::eOpenOptionAppend;
|
||||
else
|
||||
open_options |= File::eOpenOptionTruncate;
|
||||
stream_file->GetFile().Open(path, open_options,
|
||||
lldb::eFilePermissionsFileDefault);
|
||||
|
||||
FileSystem::Instance().Open(stream_file->GetFile(), FileSpec(path),
|
||||
open_options);
|
||||
m_opaque_ap.reset(stream_file);
|
||||
|
||||
if (m_opaque_ap.get()) {
|
||||
|
||||
Reference in new issue
Block a user