summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/API/SBStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/lldb/source/API/SBStream.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/API/SBStream.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/llvm/tools/lldb/source/API/SBStream.cpp b/contrib/llvm/tools/lldb/source/API/SBStream.cpp
index 531ab9f..f5b5c08 100644
--- a/contrib/llvm/tools/lldb/source/API/SBStream.cpp
+++ b/contrib/llvm/tools/lldb/source/API/SBStream.cpp
@@ -82,6 +82,8 @@ SBStream::RedirectToFile (const char *path, bool append)
uint32_t open_options = File::eOpenOptionWrite | File::eOpenOptionCanCreate;
if (append)
open_options |= File::eOpenOptionAppend;
+ else
+ open_options |= File::eOpenOptionTruncate;
stream_file->GetFile().Open (path, open_options, lldb::eFilePermissionsFileDefault);
m_opaque_ap.reset (stream_file);
OpenPOWER on IntegriCloud