uint32_t options -> File::OpenOptions options

Summary:
This patch re-types everywhere that passes a File::OpenOptions
as a uint32_t so it actually uses File::OpenOptions.

It also converts some OpenOptions related functions that fail
by returning 0 or NULL into llvm::Expected

split off from https://reviews.llvm.org/D68737

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D68853

llvm-svn: 374817
This commit is contained in:
Lawrence D'Anna committed 2019-10-14 20:15:34 +00:00
1 parent 322f12afc3
commit 62c9fe4273
24 files changed
+109 -71

No files matched your search

+1 -1
View File
@@ -82,7 +82,7 @@ void SBStream::RedirectToFile(const char *path, bool append) {
if (!m_is_file)
local_data = static_cast<StreamString *>(m_opaque_up.get())->GetString();
}
uint32_t open_options = File::eOpenOptionWrite | File::eOpenOptionCanCreate;
auto open_options = File::eOpenOptionWrite | File::eOpenOptionCanCreate;
if (append)
open_options |= File::eOpenOptionAppend;
else