summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-14 21:37:36 +0000
committerZachary Turner <zturner@google.com>2015-10-14 21:37:36 +0000
commit4eff2d3177caa7ddbe901d54619f483ed4323e1b (patch)
tree15dc969266976323f8766a1bf893b3de750f04c8 /lldb/source/Target/Process.cpp
parentefc23de4dd6b9066d83742c7e307067824ced69a (diff)
downloadbcm5719-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/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index cf3090664b9..e634c1d5318 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -21,6 +21,7 @@
#include "lldb/Expression/UserExpression.h"
#include "lldb/Expression/IRDynamicChecks.h"
#include "lldb/Host/ConnectionFileDescriptor.h"
+#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/Pipe.h"
@@ -478,7 +479,7 @@ ProcessLaunchCommandOptions::SetOptionValue (uint32_t option_idx, const char *op
case 'n': // Disable STDIO
{
FileAction action;
- const FileSpec dev_null{"/dev/null", false};
+ const FileSpec dev_null{FileSystem::DEV_NULL, false};
if (action.Open(STDIN_FILENO, dev_null, true, false))
launch_info.AppendFileAction (action);
if (action.Open(STDOUT_FILENO, dev_null, false, true))
OpenPOWER on IntegriCloud