[Lldb-commits] [PATCH] D107767: Fix break introduced in 14735ca
Robin Giese via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 9 08:06:01 PDT 2021
rgiese updated this revision to Diff 365186.
rgiese added a comment.
Incorporating feedback.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107767/new/
https://reviews.llvm.org/D107767
Files:
lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
Index: lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
===================================================================
--- lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -425,10 +425,12 @@
open(file_spec.GetPath().c_str(), oflag, S_IRUSR | S_IWUSR);
if (created_fd >= 0) {
auto file_options = File::OpenOptions(0);
- if ((oflag & O_RDWR) || (oflag & O_RDONLY))
- file_options |= File::eOpenOptionReadOnly;
- if ((oflag & O_RDWR) || (oflag & O_RDONLY))
+ if (oflag & O_RDWR)
+ file_options |= File::eOpenOptionReadWrite;
+ else if (oflag & O_WRONLY)
file_options |= File::eOpenOptionWriteOnly;
+ else if (oflag & O_RDONLY)
+ file_options |= File::eOpenOptionReadOnly;
file = std::make_shared<NativeFile>(created_fd, file_options, true);
[options setValue:[NSNumber numberWithInteger:created_fd] forKey:key];
return error; // Success
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107767.365186.patch
Type: text/x-patch
Size: 1166 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210809/6d303ef0/attachment.bin>
More information about the lldb-commits
mailing list