[Lldb-commits] [lldb] 875a16b - [lldb] Fix break introduced in 14735ca
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 9 08:38:07 PDT 2021
Author: Robin Giese
Date: 2021-08-09T17:34:57+02:00
New Revision: 875a16bcfc28ba4959d67e2a4ad853f909d4ab83
URL: https://github.com/llvm/llvm-project/commit/875a16bcfc28ba4959d67e2a4ad853f909d4ab83
DIFF: https://github.com/llvm/llvm-project/commit/875a16bcfc28ba4959d67e2a4ad853f909d4ab83.diff
LOG: [lldb] Fix break introduced in 14735ca
The `File::OpenOptions` were renamed; this fixes up a callsite that breaks for
macOS builds. (See
https://github.com/llvm/llvm-project/commit/14735cab655441ba45c4b88ad82f11267e5fe916)
Differential Revision: https://reviews.llvm.org/D107767
Added:
Modified:
lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm b/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
index 91d6252aa0b16..3069214e47b84 100644
--- a/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ b/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -425,10 +425,12 @@ static Status HandleFileAction(ProcessLaunchInfo &launch_info,
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::eOpenOptionRead;
- if ((oflag & O_RDWR) || (oflag & O_RDONLY))
- file_options |= File::eOpenOptionWrite;
+ 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
More information about the lldb-commits
mailing list