Skip to content

Commit

Permalink
[lldb] Fix break introduced in 14735ca
Browse files Browse the repository at this point in the history
The `File::OpenOptions` were renamed; this fixes up a callsite that breaks for
macOS builds. (See
14735ca)

Differential Revision: https://reviews.llvm.org/D107767
  • Loading branch information
rgiese authored and Teemperor committed Aug 9, 2021
1 parent eabae4c commit 875a16b
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -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
Expand Down

0 comments on commit 875a16b

Please sign in to comment.