[Lldb-commits] [PATCH] D68853: uint32_t options -> File::OpenOptions options
Lawrence D'Anna via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 11 10:42:30 PDT 2019
lawrence_danna added inline comments.
================
Comment at: lldb/source/Host/common/File.cpp:42
-static const char *GetStreamOpenModeFromOptions(uint32_t options) {
+static Expected<const char *> GetStreamOpenModeFromOptions(uint32_t options) {
if (options & File::eOpenOptionAppend) {
----------------
labath wrote:
> I'd consider leaving the static function as `const char *` -- the function doesn't do anything complex, and there's only one way it can fail (which can be signalled by a nullptr), so having the Expected wrapper around that does not seem all that useful -- I'll leave it up to you though.
If I do that I'd still just have to convert it to Error in the callers, so I think I'll leave it this way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68853/new/
https://reviews.llvm.org/D68853
More information about the lldb-commits
mailing list