diff options
author | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-14 20:15:34 +0000 |
---|---|---|
committer | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-14 20:15:34 +0000 |
commit | 62c9fe4273e8f2a0f3f0f4c86de3a90668532354 (patch) | |
tree | 50c6f7a76ff044c13465b9ad7583558d6c275e1d /lldb/source/Commands/CommandObjectSettings.cpp | |
parent | 322f12afc3673fc868899857b069ce59084dba05 (diff) | |
download | bcm5719-llvm-62c9fe4273e8f2a0f3f0f4c86de3a90668532354.tar.gz bcm5719-llvm-62c9fe4273e8f2a0f3f0f4c86de3a90668532354.zip |
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectSettings.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectSettings.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp index 6ed63c134f2..248a04613d7 100644 --- a/lldb/source/Commands/CommandObjectSettings.cpp +++ b/lldb/source/Commands/CommandObjectSettings.cpp @@ -375,12 +375,11 @@ protected: FileSpec file_spec(m_options.m_filename); FileSystem::Instance().Resolve(file_spec); std::string path(file_spec.GetPath()); - uint32_t options = File::OpenOptions::eOpenOptionWrite | - File::OpenOptions::eOpenOptionCanCreate; + auto options = File::eOpenOptionWrite | File::eOpenOptionCanCreate; if (m_options.m_append) - options |= File::OpenOptions::eOpenOptionAppend; + options |= File::eOpenOptionAppend; else - options |= File::OpenOptions::eOpenOptionTruncate; + options |= File::eOpenOptionTruncate; StreamFile out_file(path.c_str(), options, lldb::eFilePermissionsFileDefault); |