From f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:50:09 +0000 Subject: Vendor import of lldb release_39 branch r276489: https://llvm.org/svn/llvm-project/lldb/branches/release_39@276489 --- source/Interpreter/OptionValuePathMappings.cpp | 81 +++++++++++++++++++++----- 1 file changed, 67 insertions(+), 14 deletions(-) (limited to 'source/Interpreter/OptionValuePathMappings.cpp') diff --git a/source/Interpreter/OptionValuePathMappings.cpp b/source/Interpreter/OptionValuePathMappings.cpp index 722d6a144279..f3f146f1f8c6 100644 --- a/source/Interpreter/OptionValuePathMappings.cpp +++ b/source/Interpreter/OptionValuePathMappings.cpp @@ -14,11 +14,24 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/Stream.h" +#include "lldb/Host/FileSpec.h" #include "lldb/Host/StringConvert.h" #include "lldb/Interpreter/Args.h" using namespace lldb; using namespace lldb_private; +namespace +{ + static bool + VerifyPathExists(const char *path) + { + if (path && path[0]) + return FileSpec(path, false).Exists(); + else + return false; + } +} + void OptionValuePathMappings::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) @@ -59,14 +72,27 @@ OptionValuePathMappings::SetValueFromString (llvm::StringRef value, VarSetOperat } else { + bool changed = false; for (size_t i=1; i