diff options
author | Zachary Turner <zturner@google.com> | 2015-10-14 21:37:36 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-10-14 21:37:36 +0000 |
commit | 4eff2d3177caa7ddbe901d54619f483ed4323e1b (patch) | |
tree | 15dc969266976323f8766a1bf893b3de750f04c8 /lldb/source/Target/ProcessLaunchInfo.cpp | |
parent | efc23de4dd6b9066d83742c7e307067824ced69a (diff) | |
download | bcm5719-llvm-4eff2d3177caa7ddbe901d54619f483ed4323e1b.tar.gz bcm5719-llvm-4eff2d3177caa7ddbe901d54619f483ed4323e1b.zip |
Make uses of /dev/null portable across OSes.
Most platforms have "/dev/null". Windows has "nul". Instead of
hardcoding the string /dev/null at various places, make a constant
that contains the correct value depending on the platform, and use
that everywhere instead.
llvm-svn: 250331
Diffstat (limited to 'lldb/source/Target/ProcessLaunchInfo.cpp')
-rw-r--r-- | lldb/source/Target/ProcessLaunchInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Target/ProcessLaunchInfo.cpp b/lldb/source/Target/ProcessLaunchInfo.cpp index bd2e1bc4c4a..fc17fe614c5 100644 --- a/lldb/source/Target/ProcessLaunchInfo.cpp +++ b/lldb/source/Target/ProcessLaunchInfo.cpp @@ -11,6 +11,7 @@ #include "lldb/Core/Debugger.h" #include "lldb/Core/Log.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Target/FileAction.h" #include "lldb/Target/Target.h" @@ -129,7 +130,7 @@ bool ProcessLaunchInfo::AppendSuppressFileAction (int fd, bool read, bool write) { FileAction file_action; - if (file_action.Open(fd, FileSpec{"/dev/null", false}, read, write)) + if (file_action.Open(fd, FileSpec{FileSystem::DEV_NULL, false}, read, write)) { AppendFileAction (file_action); return true; |