Use Host::File in lldb_private::StreamFile and other places to cleanup host

layer a bit more.

llvm-svn: 125149
This commit is contained in:
Greg Clayton committed 2011-02-09 01:08:52 +00:00
1 parent 7eaacc517b
commit 51b1e2d271
17 files changed
+554 -302

No files matched your search

+8 -1
View File
@@ -9,6 +9,7 @@
#include "lldb/API/SBStream.h"
#include "lldb/Core/Error.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/StreamString.h"
@@ -75,7 +76,13 @@ SBStream::RedirectToFile (const char *path, bool append)
if (!m_is_file)
local_data.swap(static_cast<StreamString *>(m_opaque_ap.get())->GetString());
}
m_opaque_ap.reset (new StreamFile (path, append ? "a" : "w"));
StreamFile *stream_file = new StreamFile;
uint32_t open_options = File::eOpenOptionWrite | File::eOpenOptionCanCreate;
if (append)
open_options |= File::eOpenOptionAppend;
stream_file->GetFile().Open (path, open_options, File::ePermissionsDefault);
m_opaque_ap.reset (stream_file);
if (m_opaque_ap.get())
{