[Lldb-commits] [lldb] r345890 - [FileSystem] Move path resolution logic out of FileSpec

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 1 14:05:37 PDT 2018


Author: jdevlieghere
Date: Thu Nov  1 14:05:36 2018
New Revision: 345890

URL: http://llvm.org/viewvc/llvm-project?rev=345890&view=rev
Log:
[FileSystem] Move path resolution logic out of FileSpec

This patch removes the logic for resolving paths out of FileSpec and
updates call sites to rely on the FileSystem class instead.

Differential revision: https://reviews.llvm.org/D53915

Modified:
    lldb/trunk/include/lldb/Target/Process.h
    lldb/trunk/include/lldb/Utility/FileSpec.h
    lldb/trunk/source/API/SBAttachInfo.cpp
    lldb/trunk/source/API/SBDebugger.cpp
    lldb/trunk/source/API/SBFileSpec.cpp
    lldb/trunk/source/API/SBHostOS.cpp
    lldb/trunk/source/API/SBLaunchInfo.cpp
    lldb/trunk/source/API/SBModuleSpec.cpp
    lldb/trunk/source/API/SBPlatform.cpp
    lldb/trunk/source/API/SBProcess.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp
    lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
    lldb/trunk/source/Commands/CommandCompletions.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
    lldb/trunk/source/Commands/CommandObjectCommands.cpp
    lldb/trunk/source/Commands/CommandObjectLog.cpp
    lldb/trunk/source/Commands/CommandObjectMemory.cpp
    lldb/trunk/source/Commands/CommandObjectPlatform.cpp
    lldb/trunk/source/Commands/CommandObjectPlugin.cpp
    lldb/trunk/source/Commands/CommandObjectProcess.cpp
    lldb/trunk/source/Commands/CommandObjectSettings.cpp
    lldb/trunk/source/Commands/CommandObjectSource.cpp
    lldb/trunk/source/Commands/CommandObjectTarget.cpp
    lldb/trunk/source/Commands/CommandObjectThread.cpp
    lldb/trunk/source/Core/Debugger.cpp
    lldb/trunk/source/Core/DynamicLoader.cpp
    lldb/trunk/source/Core/Module.cpp
    lldb/trunk/source/Core/ModuleList.cpp
    lldb/trunk/source/Core/PluginManager.cpp
    lldb/trunk/source/Core/SearchFilter.cpp
    lldb/trunk/source/Expression/REPL.cpp
    lldb/trunk/source/Host/common/Editline.cpp
    lldb/trunk/source/Host/common/File.cpp
    lldb/trunk/source/Host/common/FileSystem.cpp
    lldb/trunk/source/Host/common/Host.cpp
    lldb/trunk/source/Host/common/HostInfoBase.cpp
    lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp
    lldb/trunk/source/Host/common/Symbols.cpp
    lldb/trunk/source/Host/linux/Host.cpp
    lldb/trunk/source/Host/linux/HostInfoLinux.cpp
    lldb/trunk/source/Host/macosx/Symbols.cpp
    lldb/trunk/source/Host/macosx/objcxx/Host.mm
    lldb/trunk/source/Host/macosx/objcxx/HostInfoMacOSX.mm
    lldb/trunk/source/Host/posix/FileSystem.cpp
    lldb/trunk/source/Host/posix/HostInfoPosix.cpp
    lldb/trunk/source/Host/posix/HostProcessPosix.cpp
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp
    lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp
    lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp
    lldb/trunk/source/Interpreter/Options.cpp
    lldb/trunk/source/Interpreter/Property.cpp
    lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
    lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
    lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
    lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
    lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
    lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
    lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
    lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
    lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
    lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
    lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
    lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
    lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
    lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
    lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
    lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
    lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
    lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
    lldb/trunk/source/Symbol/CompileUnit.cpp
    lldb/trunk/source/Symbol/ObjectFile.cpp
    lldb/trunk/source/Symbol/Symbol.cpp
    lldb/trunk/source/Symbol/SymbolContext.cpp
    lldb/trunk/source/Target/ModuleCache.cpp
    lldb/trunk/source/Target/PathMappingList.cpp
    lldb/trunk/source/Target/Platform.cpp
    lldb/trunk/source/Target/Process.cpp
    lldb/trunk/source/Target/ProcessInfo.cpp
    lldb/trunk/source/Target/ProcessLaunchInfo.cpp
    lldb/trunk/source/Target/TargetList.cpp
    lldb/trunk/source/Utility/FileSpec.cpp
    lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp
    lldb/trunk/tools/lldb-server/lldb-platform.cpp
    lldb/trunk/tools/lldb-test/lldb-test.cpp
    lldb/trunk/unittests/Core/MangledTest.cpp
    lldb/trunk/unittests/Editline/EditlineTest.cpp
    lldb/trunk/unittests/Expression/ClangParserTest.cpp
    lldb/trunk/unittests/Host/FileSystemTest.cpp
    lldb/trunk/unittests/Host/SymbolsTest.cpp
    lldb/trunk/unittests/Host/linux/HostTest.cpp
    lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp
    lldb/trunk/unittests/Platform/PlatformDarwinTest.cpp
    lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
    lldb/trunk/unittests/Symbol/TestDWARFCallFrameInfo.cpp
    lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp
    lldb/trunk/unittests/Target/ModuleCacheTest.cpp
    lldb/trunk/unittests/Target/PathMappingListTest.cpp
    lldb/trunk/unittests/Utility/FileSpecTest.cpp
    lldb/trunk/unittests/Utility/StructuredDataTest.cpp

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Thu Nov  1 14:05:36 2018
@@ -319,7 +319,7 @@ public:
                            NameMatch process_name_match_type)
       : m_match_info(), m_name_match_type(process_name_match_type),
         m_match_all_users(false) {
-    m_match_info.GetExecutableFile().SetFile(process_name, false,
+    m_match_info.GetExecutableFile().SetFile(process_name,
                                              FileSpec::Style::native);
   }
 

Modified: lldb/trunk/include/lldb/Utility/FileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/FileSpec.h?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/FileSpec.h (original)
+++ lldb/trunk/include/lldb/Utility/FileSpec.h Thu Nov  1 14:05:36 2018
@@ -70,23 +70,19 @@ public:
   ///
   /// Takes a path to a file which can be just a filename, or a full path. If
   /// \a path is not nullptr or empty, this function will call
-  /// FileSpec::SetFile (const char *path, bool resolve).
+  /// FileSpec::SetFile (const char *path).
   ///
   /// @param[in] path
   ///     The full or partial path to a file.
   ///
-  /// @param[in] resolve_path
-  ///     If \b true, then we resolve the path, removing stray ../.. and so
-  ///     forth,
-  ///     if \b false we trust the path is in canonical form already.
+  /// @param[in] style
+  ///     The style of the path
   ///
-  /// @see FileSpec::SetFile (const char *path, bool resolve)
+  /// @see FileSpec::SetFile (const char *path)
   //------------------------------------------------------------------
-  explicit FileSpec(llvm::StringRef path, bool resolve_path,
-                    Style style = Style::native);
+  explicit FileSpec(llvm::StringRef path, Style style = Style::native);
 
-  explicit FileSpec(llvm::StringRef path, bool resolve_path,
-                    const llvm::Triple &Triple);
+  explicit FileSpec(llvm::StringRef path, const llvm::Triple &Triple);
 
   //------------------------------------------------------------------
   /// Copy constructor
@@ -272,13 +268,6 @@ public:
   //------------------------------------------------------------------
   void Dump(Stream *s) const;
 
-  //------------------------------------------------------------------
-  /// Canonicalize this file path (basically running the static
-  /// FileSpec::Resolve method on it). Useful if you asked us not to resolve
-  /// the file path when you set the file.
-  //------------------------------------------------------------------
-  bool ResolvePath();
-
   Style GetPathStyle() const;
 
   //------------------------------------------------------------------
@@ -342,7 +331,7 @@ public:
   bool IsAbsolute() const;
 
   /// Temporary helper for FileSystem change.
-  void SetPath(llvm::StringRef p) { SetFile(p, false); }
+  void SetPath(llvm::StringRef p) { SetFile(p); }
 
   //------------------------------------------------------------------
   /// Extract the full path to the file.
@@ -446,10 +435,9 @@ public:
   ///     If \b true, then we will try to resolve links the path using
   ///     the static FileSpec::Resolve.
   //------------------------------------------------------------------
-  void SetFile(llvm::StringRef path, bool resolve_path, Style style);
+  void SetFile(llvm::StringRef path, Style style);
 
-  void SetFile(llvm::StringRef path, bool resolve_path,
-               const llvm::Triple &Triple);
+  void SetFile(llvm::StringRef path, const llvm::Triple &Triple);
 
   bool IsResolved() const { return m_is_resolved; }
 
@@ -468,16 +456,6 @@ public:
   //------------------------------------------------------------------
   void SetIsResolved(bool is_resolved) { m_is_resolved = is_resolved; }
 
-  //------------------------------------------------------------------
-  /// Resolves user name and links in \a path, and overwrites the input
-  /// argument with the resolved path.
-  ///
-  /// @param[in] path
-  ///     Input path to be resolved, in the form of a llvm::SmallString or
-  ///     similar.
-  //------------------------------------------------------------------
-  static void Resolve(llvm::SmallVectorImpl<char> &path);
-
   FileSpec CopyByAppendingPathComponent(llvm::StringRef component) const;
   FileSpec CopyByRemovingLastPathComponent() const;
 
@@ -502,7 +480,7 @@ protected:
   //------------------------------------------------------------------
   // Convenience method for setting the file without changing the style.
   //------------------------------------------------------------------
-  void SetFile(llvm::StringRef path, bool resolve_path);
+  void SetFile(llvm::StringRef path);
 
   //------------------------------------------------------------------
   // Member variables

Modified: lldb/trunk/source/API/SBAttachInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBAttachInfo.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/API/SBAttachInfo.cpp (original)
+++ lldb/trunk/source/API/SBAttachInfo.cpp Thu Nov  1 14:05:36 2018
@@ -26,16 +26,14 @@ SBAttachInfo::SBAttachInfo(lldb::pid_t p
 SBAttachInfo::SBAttachInfo(const char *path, bool wait_for)
     : m_opaque_sp(new ProcessAttachInfo()) {
   if (path && path[0])
-    m_opaque_sp->GetExecutableFile().SetFile(path, false,
-                                             FileSpec::Style::native);
+    m_opaque_sp->GetExecutableFile().SetFile(path, FileSpec::Style::native);
   m_opaque_sp->SetWaitForLaunch(wait_for);
 }
 
 SBAttachInfo::SBAttachInfo(const char *path, bool wait_for, bool async)
     : m_opaque_sp(new ProcessAttachInfo()) {
   if (path && path[0])
-    m_opaque_sp->GetExecutableFile().SetFile(path, false,
-                                             FileSpec::Style::native);
+    m_opaque_sp->GetExecutableFile().SetFile(path, FileSpec::Style::native);
   m_opaque_sp->SetWaitForLaunch(wait_for);
   m_opaque_sp->SetAsync(async);
 }
@@ -79,8 +77,7 @@ void SBAttachInfo::SetProcessPluginName(
 
 void SBAttachInfo::SetExecutable(const char *path) {
   if (path && path[0])
-    m_opaque_sp->GetExecutableFile().SetFile(path, false,
-                                             FileSpec::Style::native);
+    m_opaque_sp->GetExecutableFile().SetFile(path, FileSpec::Style::native);
   else
     m_opaque_sp->GetExecutableFile().Clear();
 }

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Thu Nov  1 14:05:36 2018
@@ -735,7 +735,7 @@ SBTarget SBDebugger::FindTargetWithFileA
         m_opaque_sp->GetPlatformList().GetSelectedPlatform().get(), arch_name);
     TargetSP target_sp(
         m_opaque_sp->GetTargetList().FindTargetWithExecutableAndArchitecture(
-            FileSpec(filename, false), arch_name ? &arch : nullptr));
+            FileSpec(filename), arch_name ? &arch : nullptr));
     sb_target.SetSP(target_sp);
   }
   return sb_target;

Modified: lldb/trunk/source/API/SBFileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFileSpec.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFileSpec.cpp (original)
+++ lldb/trunk/source/API/SBFileSpec.cpp Thu Nov  1 14:05:36 2018
@@ -32,11 +32,15 @@ SBFileSpec::SBFileSpec(const lldb_privat
     : m_opaque_ap(new lldb_private::FileSpec(fspec)) {}
 
 // Deprecated!!!
-SBFileSpec::SBFileSpec(const char *path)
-    : m_opaque_ap(new FileSpec(path, true)) {}
+SBFileSpec::SBFileSpec(const char *path) : m_opaque_ap(new FileSpec(path)) {
+  FileSystem::Instance().Resolve(*m_opaque_ap);
+}
 
 SBFileSpec::SBFileSpec(const char *path, bool resolve)
-    : m_opaque_ap(new FileSpec(path, resolve)) {}
+    : m_opaque_ap(new FileSpec(path)) {
+  if (resolve)
+    FileSystem::Instance().Resolve(*m_opaque_ap);
+}
 
 SBFileSpec::~SBFileSpec() {}
 
@@ -68,7 +72,7 @@ bool SBFileSpec::ResolveExecutableLocati
 int SBFileSpec::ResolvePath(const char *src_path, char *dst_path,
                             size_t dst_len) {
   llvm::SmallString<64> result(src_path);
-  lldb_private::FileSpec::Resolve(result);
+  FileSystem::Instance().Resolve(result);
   ::snprintf(dst_path, dst_len, "%s", result.c_str());
   return std::min(dst_len - 1, result.size());
 }

Modified: lldb/trunk/source/API/SBHostOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBHostOS.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/API/SBHostOS.cpp (original)
+++ lldb/trunk/source/API/SBHostOS.cpp Thu Nov  1 14:05:36 2018
@@ -11,8 +11,9 @@
 #include "Plugins/ScriptInterpreter/Python/lldb-python.h"
 #endif
 
-#include "lldb/API/SBHostOS.h"
 #include "lldb/API/SBError.h"
+#include "lldb/API/SBHostOS.h"
+#include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/HostNativeThread.h"
@@ -86,7 +87,8 @@ SBFileSpec SBHostOS::GetUserHomeDirector
 
   llvm::SmallString<64> home_dir_path;
   llvm::sys::path::home_directory(home_dir_path);
-  FileSpec homedir(home_dir_path.c_str(), true);
+  FileSpec homedir(home_dir_path.c_str());
+  FileSystem::Instance().Resolve(homedir);
 
   sb_fspec.SetFileSpec(homedir);
   return sb_fspec;

Modified: lldb/trunk/source/API/SBLaunchInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBLaunchInfo.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/API/SBLaunchInfo.cpp (original)
+++ lldb/trunk/source/API/SBLaunchInfo.cpp Thu Nov  1 14:05:36 2018
@@ -128,7 +128,7 @@ const char *SBLaunchInfo::GetWorkingDire
 }
 
 void SBLaunchInfo::SetWorkingDirectory(const char *working_dir) {
-  m_opaque_sp->SetWorkingDirectory(FileSpec{working_dir, false});
+  m_opaque_sp->SetWorkingDirectory(FileSpec(working_dir));
 }
 
 uint32_t SBLaunchInfo::GetLaunchFlags() {
@@ -155,7 +155,7 @@ const char *SBLaunchInfo::GetShell() {
 }
 
 void SBLaunchInfo::SetShell(const char *path) {
-  m_opaque_sp->SetShell(FileSpec(path, false));
+  m_opaque_sp->SetShell(FileSpec(path));
 }
 
 bool SBLaunchInfo::GetShellExpandArguments() {
@@ -184,8 +184,7 @@ bool SBLaunchInfo::AddDuplicateFileActio
 
 bool SBLaunchInfo::AddOpenFileAction(int fd, const char *path, bool read,
                                      bool write) {
-  return m_opaque_sp->AppendOpenFileAction(fd, FileSpec{path, false}, read,
-                                           write);
+  return m_opaque_sp->AppendOpenFileAction(fd, FileSpec(path), read, write);
 }
 
 bool SBLaunchInfo::AddSuppressFileAction(int fd, bool read, bool write) {

Modified: lldb/trunk/source/API/SBModuleSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModuleSpec.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModuleSpec.cpp (original)
+++ lldb/trunk/source/API/SBModuleSpec.cpp Thu Nov  1 14:05:36 2018
@@ -114,7 +114,8 @@ SBModuleSpecList::~SBModuleSpecList() {}
 
 SBModuleSpecList SBModuleSpecList::GetModuleSpecifications(const char *path) {
   SBModuleSpecList specs;
-  FileSpec file_spec(path, true);
+  FileSpec file_spec(path);
+  FileSystem::Instance().Resolve(file_spec);
   Host::ResolveExecutableInBundle(file_spec);
   ObjectFile::GetModuleSpecifications(file_spec, 0, 0, *specs.m_opaque_ap);
   return specs;

Modified: lldb/trunk/source/API/SBPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBPlatform.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/API/SBPlatform.cpp (original)
+++ lldb/trunk/source/API/SBPlatform.cpp Thu Nov  1 14:05:36 2018
@@ -244,9 +244,9 @@ bool SBPlatform::SetWorkingDirectory(con
   PlatformSP platform_sp(GetSP());
   if (platform_sp) {
     if (path)
-      platform_sp->SetWorkingDirectory(FileSpec{path, false});
+      platform_sp->SetWorkingDirectory(FileSpec(path));
     else
-      platform_sp->SetWorkingDirectory(FileSpec{});
+      platform_sp->SetWorkingDirectory(FileSpec());
     return true;
   }
   return false;
@@ -406,7 +406,7 @@ SBError SBPlatform::Run(SBPlatformShellC
       if (working_dir)
         shell_command.SetWorkingDirectory(working_dir);
     }
-    return platform_sp->RunShellCommand(command, FileSpec{working_dir, false},
+    return platform_sp->RunShellCommand(command, FileSpec(working_dir),
                                         &shell_command.m_opaque_ptr->m_status,
                                         &shell_command.m_opaque_ptr->m_signo,
                                         &shell_command.m_opaque_ptr->m_output,
@@ -449,7 +449,7 @@ SBError SBPlatform::MakeDirectory(const
   PlatformSP platform_sp(GetSP());
   if (platform_sp) {
     sb_error.ref() =
-        platform_sp->MakeDirectory(FileSpec{path, false}, file_permissions);
+        platform_sp->MakeDirectory(FileSpec(path), file_permissions);
   } else {
     sb_error.SetErrorString("invalid platform");
   }
@@ -460,7 +460,7 @@ uint32_t SBPlatform::GetFilePermissions(
   PlatformSP platform_sp(GetSP());
   if (platform_sp) {
     uint32_t file_permissions = 0;
-    platform_sp->GetFilePermissions(FileSpec{path, false}, file_permissions);
+    platform_sp->GetFilePermissions(FileSpec(path), file_permissions);
     return file_permissions;
   }
   return 0;
@@ -471,8 +471,8 @@ SBError SBPlatform::SetFilePermissions(c
   SBError sb_error;
   PlatformSP platform_sp(GetSP());
   if (platform_sp) {
-    sb_error.ref() = platform_sp->SetFilePermissions(FileSpec{path, false},
-                                                     file_permissions);
+    sb_error.ref() =
+        platform_sp->SetFilePermissions(FileSpec(path), file_permissions);
   } else {
     sb_error.SetErrorString("invalid platform");
   }

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Thu Nov  1 14:05:36 2018
@@ -130,10 +130,9 @@ bool SBProcess::RemoteLaunch(char const
     if (process_sp->GetState() == eStateConnected) {
       if (stop_at_entry)
         launch_flags |= eLaunchFlagStopAtEntry;
-      ProcessLaunchInfo launch_info(
-          FileSpec{stdin_path, false}, FileSpec{stdout_path, false},
-          FileSpec{stderr_path, false}, FileSpec{working_directory, false},
-          launch_flags);
+      ProcessLaunchInfo launch_info(FileSpec(stdin_path), FileSpec(stdout_path),
+                                    FileSpec(stderr_path),
+                                    FileSpec(working_directory), launch_flags);
       Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer();
       if (exe_module)
         launch_info.SetExecutableFile(exe_module->GetPlatformFileSpec(), true);
@@ -1351,7 +1350,7 @@ lldb::SBError SBProcess::SaveCore(const
     return error;
   }
 
-  FileSpec core_file(file_name, false);
+  FileSpec core_file(file_name);
   error.ref() = PluginManager::SaveCore(process_sp, core_file);
   return error;
 }

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Thu Nov  1 14:05:36 2018
@@ -226,7 +226,8 @@ SBProcess SBTarget::LoadCore(const char
   SBProcess sb_process;
   TargetSP target_sp(GetSP());
   if (target_sp) {
-    FileSpec filespec(core_file, true);
+    FileSpec filespec(core_file);
+    FileSystem::Instance().Resolve(filespec);
     ProcessSP process_sp(target_sp->CreateProcess(
         target_sp->GetDebugger().GetListener(), "", &filespec));
     if (process_sp) {
@@ -325,10 +326,9 @@ SBProcess SBTarget::Launch(SBListener &l
     if (getenv("LLDB_LAUNCH_FLAG_DISABLE_STDIO"))
       launch_flags |= eLaunchFlagDisableSTDIO;
 
-    ProcessLaunchInfo launch_info(
-        FileSpec{stdin_path, false}, FileSpec{stdout_path, false},
-        FileSpec{stderr_path, false}, FileSpec{working_directory, false},
-        launch_flags);
+    ProcessLaunchInfo launch_info(FileSpec(stdin_path), FileSpec(stdout_path),
+                                  FileSpec(stderr_path),
+                                  FileSpec(working_directory), launch_flags);
 
     Module *exe_module = target_sp->GetExecutableModulePointer();
     if (exe_module)
@@ -516,8 +516,7 @@ lldb::SBProcess SBTarget::AttachToProces
 
   if (name && target_sp) {
     ProcessAttachInfo attach_info;
-    attach_info.GetExecutableFile().SetFile(name, false,
-                                            FileSpec::Style::native);
+    attach_info.GetExecutableFile().SetFile(name, FileSpec::Style::native);
     attach_info.SetWaitForLaunch(wait_for);
     if (listener.IsValid())
       attach_info.SetListener(listener.GetSP());
@@ -766,7 +765,7 @@ SBBreakpoint SBTarget::BreakpointCreateB
     const lldb::addr_t offset = 0;
     if (module_name && module_name[0]) {
       FileSpecList module_spec_list;
-      module_spec_list.Append(FileSpec(module_name, false));
+      module_spec_list.Append(FileSpec(module_name));
       sb_bp = target_sp->CreateBreakpoint(
           &module_spec_list, NULL, symbol_name, eFunctionNameTypeAuto,
           eLanguageTypeUnknown, offset, skip_prologue, internal, hardware);
@@ -894,7 +893,7 @@ SBBreakpoint SBTarget::BreakpointCreateB
   SBFileSpecList module_spec_list;
   SBFileSpecList comp_unit_list;
   if (module_name && module_name[0]) {
-    module_spec_list.Append(FileSpec(module_name, false));
+    module_spec_list.Append(FileSpec(module_name));
   }
   return BreakpointCreateByRegex(symbol_name_regex, eLanguageTypeUnknown,
                                  module_spec_list, comp_unit_list);
@@ -995,7 +994,7 @@ SBTarget::BreakpointCreateBySourceRegex(
   SBFileSpecList module_spec_list;
 
   if (module_name && module_name[0]) {
-    module_spec_list.Append(FileSpec(module_name, false));
+    module_spec_list.Append(FileSpec(module_name));
   }
 
   SBFileSpecList source_file_list;
@@ -1549,7 +1548,7 @@ lldb::SBModule SBTarget::AddModule(const
   if (target_sp) {
     ModuleSpec module_spec;
     if (path)
-      module_spec.GetFileSpec().SetFile(path, false, FileSpec::Style::native);
+      module_spec.GetFileSpec().SetFile(path, FileSpec::Style::native);
 
     if (uuid_cstr)
       module_spec.GetUUID().SetFromStringRef(uuid_cstr);
@@ -1561,8 +1560,7 @@ lldb::SBModule SBTarget::AddModule(const
       module_spec.GetArchitecture() = target_sp->GetArchitecture();
 
     if (symfile)
-      module_spec.GetSymbolFileSpec().SetFile(symfile, false,
-                                              FileSpec::Style::native);
+      module_spec.GetSymbolFileSpec().SetFile(symfile, FileSpec::Style::native);
 
     sb_module.SetSP(target_sp->GetSharedModule(module_spec));
   }

Modified: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp Thu Nov  1 14:05:36 2018
@@ -66,7 +66,7 @@ BreakpointResolver *BreakpointResolverAd
       error.SetErrorString("BRA::CFSD: Couldn't read module name entry.");
       return nullptr;
     }
-    module_filespec.SetFile(module_name, false, FileSpec::Style::native);
+    module_filespec.SetFile(module_name, FileSpec::Style::native);
   }
   return new BreakpointResolverAddress(bkpt, address, module_filespec);
 }

Modified: lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp Thu Nov  1 14:05:36 2018
@@ -92,7 +92,7 @@ BreakpointResolver *BreakpointResolverFi
     return nullptr;
   }
 
-  FileSpec file_spec(filename, false);
+  FileSpec file_spec(filename);
 
   return new BreakpointResolverFileLine(bkpt, file_spec, line_no, column,
                                         offset, check_inlines, skip_prologue,

Modified: lldb/trunk/source/Commands/CommandCompletions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandCompletions.cpp (original)
+++ lldb/trunk/source/Commands/CommandCompletions.cpp Thu Nov  1 14:05:36 2018
@@ -361,7 +361,7 @@ CommandCompletions::SourceFileCompleter:
     CompletionRequest &request)
     : CommandCompletions::Completer(interpreter, request),
       m_include_support_files(include_support_files), m_matching_files() {
-  FileSpec partial_spec(m_request.GetCursorArgumentPrefix(), false);
+  FileSpec partial_spec(m_request.GetCursorArgumentPrefix());
   m_file_name = partial_spec.GetFilename().GetCString();
   m_dir_name = partial_spec.GetDirectory().GetCString();
 }
@@ -501,7 +501,7 @@ size_t CommandCompletions::SymbolComplet
 CommandCompletions::ModuleCompleter::ModuleCompleter(
     CommandInterpreter &interpreter, CompletionRequest &request)
     : CommandCompletions::Completer(interpreter, request) {
-  FileSpec partial_spec(m_request.GetCursorArgumentPrefix(), false);
+  FileSpec partial_spec(m_request.GetCursorArgumentPrefix());
   m_file_name = partial_spec.GetFilename().GetCString();
   m_dir_name = partial_spec.GetDirectory().GetCString();
 }

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Thu Nov  1 14:05:36 2018
@@ -438,7 +438,7 @@ public:
       } break;
 
       case 'f':
-        m_filenames.AppendIfUnique(FileSpec(option_arg, false));
+        m_filenames.AppendIfUnique(FileSpec(option_arg));
         break;
 
       case 'F':
@@ -557,7 +557,7 @@ public:
         break;
 
       case 's':
-        m_modules.AppendIfUnique(FileSpec(option_arg, false));
+        m_modules.AppendIfUnique(FileSpec(option_arg));
         break;
 
       case 'S':
@@ -2370,7 +2370,8 @@ protected:
     std::unique_lock<std::recursive_mutex> lock;
     target->GetBreakpointList().GetListMutex(lock);
 
-    FileSpec input_spec(m_options.m_filename, true);
+    FileSpec input_spec(m_options.m_filename);
+    FileSystem::Instance().Resolve(input_spec);
     BreakpointIDList new_bps;
     Status error = target->CreateBreakpointsFromFile(
         input_spec, m_options.m_names, new_bps);
@@ -2504,8 +2505,10 @@ protected:
         return false;
       }
     }
-    Status error = target->SerializeBreakpointsToFile(
-        FileSpec(m_options.m_filename, true), valid_bp_ids, m_options.m_append);
+    FileSpec file_spec(m_options.m_filename);
+    FileSystem::Instance().Resolve(file_spec);
+    Status error = target->SerializeBreakpointsToFile(file_spec, valid_bp_ids,
+                                                      m_options.m_append);
     if (!error.Success()) {
       result.AppendErrorWithFormat("error serializing breakpoints: %s.",
                                    error.AsCString());

Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Thu Nov  1 14:05:36 2018
@@ -308,7 +308,8 @@ protected:
       return false;
     }
 
-    FileSpec cmd_file(command[0].ref, true);
+    FileSpec cmd_file(command[0].ref);
+    FileSystem::Instance().Resolve(cmd_file);
     ExecutionContext *exe_ctx = nullptr; // Just use the default context.
 
     // If any options were set, then use them

Modified: lldb/trunk/source/Commands/CommandObjectLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectLog.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectLog.cpp Thu Nov  1 14:05:36 2018
@@ -101,7 +101,8 @@ public:
 
       switch (short_option) {
       case 'f':
-        log_file.SetFile(option_arg, true, FileSpec::Style::native);
+        log_file.SetFile(option_arg, FileSpec::Style::native);
+        FileSystem::Instance().Resolve(log_file);
         break;
       case 't':
         log_options |= LLDB_LOG_OPTION_THREADSAFE;

Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Thu Nov  1 14:05:36 2018
@@ -1209,7 +1209,8 @@ public:
 
       switch (short_option) {
       case 'i':
-        m_infile.SetFile(option_value, true, FileSpec::Style::native);
+        m_infile.SetFile(option_value, FileSpec::Style::native);
+        FileSystem::Instance().Resolve(m_infile);
         if (!FileSystem::Instance().Exists(m_infile)) {
           m_infile.Clear();
           error.SetErrorStringWithFormat("input file does not exist: '%s'",

Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Thu Nov  1 14:05:36 2018
@@ -491,8 +491,7 @@ public:
       else
         mode = lldb::eFilePermissionsUserRWX | lldb::eFilePermissionsGroupRWX |
                lldb::eFilePermissionsWorldRX;
-      Status error =
-          platform_sp->MakeDirectory(FileSpec{cmd_line, false}, mode);
+      Status error = platform_sp->MakeDirectory(FileSpec(cmd_line), mode);
       if (error.Success()) {
         result.SetStatus(eReturnStatusSuccessFinishResult);
       } else {
@@ -545,7 +544,7 @@ public:
         perms = lldb::eFilePermissionsUserRW | lldb::eFilePermissionsGroupRW |
                 lldb::eFilePermissionsWorldRead;
       lldb::user_id_t fd = platform_sp->OpenFile(
-          FileSpec(cmd_line, false),
+          FileSpec(cmd_line),
           File::eOpenOptionRead | File::eOpenOptionWrite |
               File::eOpenOptionAppend | File::eOpenOptionCanCreate,
           perms, error);
@@ -883,8 +882,8 @@ public:
     if (platform_sp) {
       const char *remote_file_path = args.GetArgumentAtIndex(0);
       const char *local_file_path = args.GetArgumentAtIndex(1);
-      Status error = platform_sp->GetFile(FileSpec(remote_file_path, false),
-                                          FileSpec(local_file_path, false));
+      Status error = platform_sp->GetFile(FileSpec(remote_file_path),
+                                          FileSpec(local_file_path));
       if (error.Success()) {
         result.AppendMessageWithFormat(
             "successfully get-file from %s (remote) to %s (host)\n",
@@ -949,8 +948,7 @@ public:
         m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
     if (platform_sp) {
       std::string remote_file_path(args.GetArgumentAtIndex(0));
-      user_id_t size =
-          platform_sp->GetFileSize(FileSpec(remote_file_path, false));
+      user_id_t size = platform_sp->GetFileSize(FileSpec(remote_file_path));
       if (size != UINT64_MAX) {
         result.AppendMessageWithFormat("File size of %s (remote): %" PRIu64
                                        "\n",
@@ -987,8 +985,9 @@ public:
     const char *src = args.GetArgumentAtIndex(0);
     const char *dst = args.GetArgumentAtIndex(1);
 
-    FileSpec src_fs(src, true);
-    FileSpec dst_fs(dst ? dst : src_fs.GetFilename().GetCString(), false);
+    FileSpec src_fs(src);
+    FileSystem::Instance().Resolve(src_fs);
+    FileSpec dst_fs(dst ? dst : src_fs.GetFilename().GetCString());
 
     PlatformSP platform_sp(
         m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
@@ -1336,31 +1335,31 @@ protected:
 
       case 'n':
         match_info.GetProcessInfo().GetExecutableFile().SetFile(
-            option_arg, false, FileSpec::Style::native);
+            option_arg, FileSpec::Style::native);
         match_info.SetNameMatchType(NameMatch::Equals);
         break;
 
       case 'e':
         match_info.GetProcessInfo().GetExecutableFile().SetFile(
-            option_arg, false, FileSpec::Style::native);
+            option_arg, FileSpec::Style::native);
         match_info.SetNameMatchType(NameMatch::EndsWith);
         break;
 
       case 's':
         match_info.GetProcessInfo().GetExecutableFile().SetFile(
-            option_arg, false, FileSpec::Style::native);
+            option_arg, FileSpec::Style::native);
         match_info.SetNameMatchType(NameMatch::StartsWith);
         break;
 
       case 'c':
         match_info.GetProcessInfo().GetExecutableFile().SetFile(
-            option_arg, false, FileSpec::Style::native);
+            option_arg, FileSpec::Style::native);
         match_info.SetNameMatchType(NameMatch::Contains);
         break;
 
       case 'r':
         match_info.GetProcessInfo().GetExecutableFile().SetFile(
-            option_arg, false, FileSpec::Style::native);
+            option_arg, FileSpec::Style::native);
         match_info.SetNameMatchType(NameMatch::RegularExpression);
         break;
 
@@ -1529,7 +1528,7 @@ public:
         break;
 
       case 'n':
-        attach_info.GetExecutableFile().SetFile(option_arg, false,
+        attach_info.GetExecutableFile().SetFile(option_arg,
                                                 FileSpec::Style::native);
         break;
 
@@ -1576,7 +1575,7 @@ public:
           ProcessInstanceInfoMatch match_info;
           if (partial_name) {
             match_info.GetProcessInfo().GetExecutableFile().SetFile(
-                partial_name, false, FileSpec::Style::native);
+                partial_name, FileSpec::Style::native);
             match_info.SetNameMatchType(NameMatch::StartsWith);
           }
           platform_sp->FindProcesses(match_info, process_infos);
@@ -1816,8 +1815,9 @@ public:
       return false;
     }
     // TODO: move the bulk of this code over to the platform itself
-    FileSpec src(args.GetArgumentAtIndex(0), true);
-    FileSpec dst(args.GetArgumentAtIndex(1), false);
+    FileSpec src(args.GetArgumentAtIndex(0));
+    FileSystem::Instance().Resolve(src);
+    FileSpec dst(args.GetArgumentAtIndex(1));
     if (!FileSystem::Instance().Exists(src)) {
       result.AppendError("source location does not exist or is not accessible");
       result.SetStatus(eReturnStatusFailed);

Modified: lldb/trunk/source/Commands/CommandObjectPlugin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlugin.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectPlugin.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectPlugin.cpp Thu Nov  1 14:05:36 2018
@@ -63,7 +63,8 @@ protected:
 
     Status error;
 
-    FileSpec dylib_fspec(command[0].ref, true);
+    FileSpec dylib_fspec(command[0].ref);
+    FileSystem::Instance().Resolve(dylib_fspec);
 
     if (m_interpreter.GetDebugger().LoadPlugin(dylib_fspec, error))
       result.SetStatus(eReturnStatusSuccessFinishResult);

Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Thu Nov  1 14:05:36 2018
@@ -352,7 +352,7 @@ public:
         break;
 
       case 'n':
-        attach_info.GetExecutableFile().SetFile(option_arg, false,
+        attach_info.GetExecutableFile().SetFile(option_arg,
                                                 FileSpec::Style::native);
         break;
 
@@ -403,7 +403,7 @@ public:
           ProcessInstanceInfoMatch match_info;
           if (partial_name) {
             match_info.GetProcessInfo().GetExecutableFile().SetFile(
-                partial_name, false, FileSpec::Style::native);
+                partial_name, FileSpec::Style::native);
             match_info.SetNameMatchType(NameMatch::StartsWith);
           }
           platform_sp->FindProcesses(match_info, process_infos);
@@ -975,7 +975,7 @@ public:
       case 'i':
         do_install = true;
         if (!option_arg.empty())
-          install_path.SetFile(option_arg, false, FileSpec::Style::native);
+          install_path.SetFile(option_arg, FileSpec::Style::native);
         break;
       default:
         error.SetErrorStringWithFormat("invalid short option character '%c'",
@@ -1023,18 +1023,20 @@ protected:
       uint32_t image_token = LLDB_INVALID_IMAGE_TOKEN;
 
       if (!m_options.do_install) {
-        FileSpec image_spec(image_path, false);
+        FileSpec image_spec(image_path);
         platform->ResolveRemotePath(image_spec, image_spec);
         image_token =
             platform->LoadImage(process, FileSpec(), image_spec, error);
       } else if (m_options.install_path) {
-        FileSpec image_spec(image_path, true);
+        FileSpec image_spec(image_path);
+        FileSystem::Instance().Resolve(image_spec);
         platform->ResolveRemotePath(m_options.install_path,
                                     m_options.install_path);
         image_token = platform->LoadImage(process, image_spec,
                                           m_options.install_path, error);
       } else {
-        FileSpec image_spec(image_path, true);
+        FileSpec image_spec(image_path);
+        FileSystem::Instance().Resolve(image_spec);
         image_token =
             platform->LoadImage(process, image_spec, FileSpec(), error);
       }
@@ -1281,7 +1283,7 @@ protected:
     ProcessSP process_sp = m_exe_ctx.GetProcessSP();
     if (process_sp) {
       if (command.GetArgumentCount() == 1) {
-        FileSpec output_file(command.GetArgumentAtIndex(0), false);
+        FileSpec output_file(command.GetArgumentAtIndex(0));
         Status error = PluginManager::SaveCore(process_sp, output_file);
         if (error.Success()) {
           result.SetStatus(eReturnStatusSuccessFinishResult);

Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Thu Nov  1 14:05:36 2018
@@ -403,7 +403,9 @@ public:
 
 protected:
   bool DoExecute(Args &args, CommandReturnObject &result) override {
-    std::string path(FileSpec(m_options.m_filename, true).GetPath());
+    FileSpec file_spec(m_options.m_filename);
+    FileSystem::Instance().Resolve(file_spec);
+    std::string path(file_spec.GetPath());
     uint32_t options = File::OpenOptions::eOpenOptionWrite |
                        File::OpenOptions::eOpenOptionCanCreate;
     if (m_options.m_append)
@@ -506,7 +508,8 @@ public:
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    FileSpec file(m_options.m_filename, true);
+    FileSpec file(m_options.m_filename);
+    FileSystem::Instance().Resolve(file);
     ExecutionContext clean_ctx;
     CommandInterpreterRunOptions options;
     options.SetAddToHistory(false);

Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Thu Nov  1 14:05:36 2018
@@ -517,7 +517,7 @@ protected:
 
   // Dump the line entries found in the file specified in the option.
   bool DumpLinesForFile(CommandReturnObject &result) {
-    FileSpec file_spec(m_options.file_name, false);
+    FileSpec file_spec(m_options.file_name);
     const char *filename = m_options.file_name.c_str();
     Target *target = m_exe_ctx.GetTargetPtr();
     const ModuleList &module_list =
@@ -596,7 +596,7 @@ protected:
     m_module_list.Clear();
     if (!m_options.modules.empty()) {
       for (size_t i = 0, e = m_options.modules.size(); i < e; ++i) {
-        FileSpec module_file_spec(m_options.modules[i], false);
+        FileSpec module_file_spec(m_options.modules[i]);
         if (module_file_spec) {
           ModuleSpec module_spec(module_file_spec);
           if (target->GetImages().FindModules(module_spec, m_module_list) == 0)
@@ -921,7 +921,7 @@ protected:
     if (num_modules > 0) {
       ModuleList matching_modules;
       for (size_t i = 0; i < num_modules; ++i) {
-        FileSpec module_file_spec(m_options.modules[i], false);
+        FileSpec module_file_spec(m_options.modules[i]);
         if (module_file_spec) {
           ModuleSpec module_spec(module_file_spec);
           matching_modules.Clear();
@@ -946,7 +946,7 @@ protected:
     if (num_modules > 0) {
       ModuleList matching_modules;
       for (size_t i = 0; i < num_modules; ++i) {
-        FileSpec module_file_spec(m_options.modules[i], false);
+        FileSpec module_file_spec(m_options.modules[i]);
         if (module_file_spec) {
           ModuleSpec module_spec(module_file_spec);
           matching_modules.Clear();
@@ -1203,7 +1203,7 @@ protected:
       if (!m_options.modules.empty()) {
         ModuleList matching_modules;
         for (size_t i = 0, e = m_options.modules.size(); i < e; ++i) {
-          FileSpec module_file_spec(m_options.modules[i], false);
+          FileSpec module_file_spec(m_options.modules[i]);
           if (module_file_spec) {
             ModuleSpec module_spec(module_file_spec);
             matching_modules.Clear();

Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Thu Nov  1 14:05:36 2018
@@ -313,8 +313,10 @@ protected:
       Timer scoped_timer(func_cat, "(lldb) target create '%s'", file_path);
       FileSpec file_spec;
 
-      if (file_path)
-        file_spec.SetFile(file_path, true, FileSpec::Style::native);
+      if (file_path) {
+        file_spec.SetFile(file_path, FileSpec::Style::native);
+        FileSystem::Instance().Resolve(file_spec);
+      }
 
       bool must_set_platform_path = false;
 
@@ -1793,7 +1795,7 @@ static uint32_t LookupFileAndLineInModul
 static size_t FindModulesByName(Target *target, const char *module_name,
                                 ModuleList &module_list,
                                 bool check_global_list) {
-  FileSpec module_file_spec(module_name, false);
+  FileSpec module_file_spec(module_name);
   ModuleSpec module_spec(module_file_spec);
 
   const size_t initial_size = module_list.GetSize();
@@ -2352,7 +2354,7 @@ protected:
       for (int arg_idx = 0;
            (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr;
            ++arg_idx) {
-        FileSpec file_spec(arg_cstr, false);
+        FileSpec file_spec(arg_cstr);
 
         const ModuleList &target_modules = target->GetImages();
         std::lock_guard<std::recursive_mutex> guard(target_modules.GetMutex());
@@ -2532,7 +2534,7 @@ protected:
           if (entry.ref.empty())
             continue;
 
-          FileSpec file_spec(entry.ref, true);
+          FileSpec file_spec(entry.ref);
           if (FileSystem::Instance().Exists(file_spec)) {
             ModuleSpec module_spec(file_spec);
             if (m_uuid_option_group.GetOptionValue().OptionWasSet())
@@ -3616,7 +3618,7 @@ public:
         break;
 
       case 'f':
-        m_file.SetFile(option_arg, false, FileSpec::Style::native);
+        m_file.SetFile(option_arg, FileSpec::Style::native);
         m_type = eLookupTypeFileLine;
         break;
 
@@ -4348,8 +4350,9 @@ protected:
 
         for (auto &entry : args.entries()) {
           if (!entry.ref.empty()) {
-            module_spec.GetSymbolFileSpec().SetFile(entry.ref, true,
-                                                    FileSpec::Style::native);
+            auto &symbol_file_spec = module_spec.GetSymbolFileSpec();
+            symbol_file_spec.SetFile(entry.ref, FileSpec::Style::native);
+            FileSystem::Instance().Resolve(symbol_file_spec);
             if (file_option_set) {
               module_spec.GetFileSpec() =
                   m_file_option.GetOptionValue().GetCurrentValue();

Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Thu Nov  1 14:05:36 2018
@@ -1729,7 +1729,7 @@ public:
 
       switch (short_option) {
       case 'f':
-        m_filenames.AppendIfUnique(FileSpec(option_arg, false));
+        m_filenames.AppendIfUnique(FileSpec(option_arg));
         if (m_filenames.GetSize() > 1)
           return Status("only one source file expected.");
         break;

Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Thu Nov  1 14:05:36 2018
@@ -625,8 +625,8 @@ LoadPluginCallback(void *baton, llvm::sy
   // file type information.
   if (ft == fs::file_type::regular_file || ft == fs::file_type::symlink_file ||
       ft == fs::file_type::type_unknown) {
-    FileSpec plugin_file_spec(path, false);
-    plugin_file_spec.ResolvePath();
+    FileSpec plugin_file_spec(path);
+    FileSystem::Instance().Resolve(plugin_file_spec);
 
     if (plugin_file_spec.GetFileNameExtension() != g_dylibext &&
         plugin_file_spec.GetFileNameExtension() != g_solibext) {

Modified: lldb/trunk/source/Core/DynamicLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DynamicLoader.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Core/DynamicLoader.cpp (original)
+++ lldb/trunk/source/Core/DynamicLoader.cpp Thu Nov  1 14:05:36 2018
@@ -195,9 +195,8 @@ ModuleSP DynamicLoader::LoadModuleAtAddr
     if (error.Success() && memory_info.GetMapped() &&
         memory_info.GetRange().GetRangeBase() == base_addr && 
         !(memory_info.GetName().IsEmpty())) {
-      ModuleSpec new_module_spec(
-          FileSpec(memory_info.GetName().AsCString(), false),
-          target.GetArchitecture());
+      ModuleSpec new_module_spec(FileSpec(memory_info.GetName().AsCString()),
+                                 target.GetArchitecture());
 
       if ((module_sp = modules.FindFirstModule(new_module_spec))) {
         UpdateLoadedSections(module_sp, link_map_addr, base_addr, false);

Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Thu Nov  1 14:05:36 2018
@@ -569,7 +569,7 @@ uint32_t Module::ResolveSymbolContextFor
 uint32_t Module::ResolveSymbolContextForFilePath(
     const char *file_path, uint32_t line, bool check_inlines,
     lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) {
-  FileSpec file_spec(file_path, false);
+  FileSpec file_spec(file_path);
   return ResolveSymbolContextsForFileSpec(file_spec, line, check_inlines,
                                           resolve_scope, sc_list);
 }

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Thu Nov  1 14:05:36 2018
@@ -690,7 +690,7 @@ ModuleList::ResolveSymbolContextForAddre
 uint32_t ModuleList::ResolveSymbolContextForFilePath(
     const char *file_path, uint32_t line, bool check_inlines,
     SymbolContextItem resolve_scope, SymbolContextList &sc_list) const {
-  FileSpec file_spec(file_path, false);
+  FileSpec file_spec(file_path);
   return ResolveSymbolContextsForFileSpec(file_spec, line, check_inlines,
                                           resolve_scope, sc_list);
 }
@@ -857,8 +857,7 @@ Status ModuleList::GetSharedModule(const
     const auto num_directories = module_search_paths_ptr->GetSize();
     for (size_t idx = 0; idx < num_directories; ++idx) {
       auto search_path_spec = module_search_paths_ptr->GetFileSpecAtIndex(idx);
-      if (!search_path_spec.ResolvePath())
-        continue;
+      FileSystem::Instance().Resolve(search_path_spec);
       namespace fs = llvm::sys::fs;
       if (!fs::is_directory(search_path_spec.GetPath()))
         continue;

Modified: lldb/trunk/source/Core/PluginManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/PluginManager.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Core/PluginManager.cpp (original)
+++ lldb/trunk/source/Core/PluginManager.cpp Thu Nov  1 14:05:36 2018
@@ -103,8 +103,8 @@ LoadPluginCallback(void *baton, llvm::sy
   // file type information.
   if (ft == fs::file_type::regular_file || ft == fs::file_type::symlink_file ||
       ft == fs::file_type::type_unknown) {
-    FileSpec plugin_file_spec(path, false);
-    plugin_file_spec.ResolvePath();
+    FileSpec plugin_file_spec(path);
+    FileSystem::Instance().Resolve(plugin_file_spec);
 
     if (PluginIsLoaded(plugin_file_spec))
       return FileSystem::eEnumerateDirectoryResultNext;

Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Thu Nov  1 14:05:36 2018
@@ -524,7 +524,7 @@ SearchFilterSP SearchFilterByModule::Cre
     error.SetErrorString("SFBM::CFSD: filter module item not a string.");
     return nullptr;
   }
-  FileSpec module_spec(module, false);
+  FileSpec module_spec(module);
 
   return std::make_shared<SearchFilterByModule>(target.shared_from_this(),
                                                 module_spec);
@@ -680,7 +680,7 @@ SearchFilterSP SearchFilterByModuleList:
             "SFBM::CFSD: filter module item %zu not a string.", i);
         return nullptr;
       }
-      modules.Append(FileSpec(module, false));
+      modules.Append(FileSpec(module));
     }
   }
 
@@ -745,7 +745,7 @@ lldb::SearchFilterSP SearchFilterByModul
             "SFBM::CFSD: filter module item %zu not a string.", i);
         return result_sp;
       }
-      modules.Append(FileSpec(module, false));
+      modules.Append(FileSpec(module));
     }
   }
 
@@ -767,7 +767,7 @@ lldb::SearchFilterSP SearchFilterByModul
           "SFBM::CFSD: filter cu item %zu not a string.", i);
       return nullptr;
     }
-    cus.Append(FileSpec(cu, false));
+    cus.Append(FileSpec(cu));
   }
 
   return std::make_shared<SearchFilterByModuleListAndCU>(

Modified: lldb/trunk/source/Expression/REPL.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/REPL.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Expression/REPL.cpp (original)
+++ lldb/trunk/source/Expression/REPL.cpp Thu Nov  1 14:05:36 2018
@@ -66,7 +66,7 @@ std::string REPL::GetSourcePath() {
     tmpdir_file_spec.GetFilename().SetCString(file_basename.AsCString());
     m_repl_source_path = tmpdir_file_spec.GetPath();
   } else {
-    tmpdir_file_spec = FileSpec("/tmp", false);
+    tmpdir_file_spec = FileSpec("/tmp");
     tmpdir_file_spec.AppendPathComponent(file_basename.AsCString());
   }
 
@@ -429,7 +429,7 @@ void REPL::IOHandlerInputComplete(IOHand
 
             // Now set the default file and line to the REPL source file
             m_target.GetSourceManager().SetDefaultFileAndLine(
-                FileSpec(m_repl_source_path, false), new_default_line);
+                FileSpec(m_repl_source_path), new_default_line);
           }
           static_cast<IOHandlerEditline &>(io_handler)
               .SetBaseLineNumber(m_code.GetSize() + 1);

Modified: lldb/trunk/source/Host/common/Editline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Editline.cpp (original)
+++ lldb/trunk/source/Host/common/Editline.cpp Thu Nov  1 14:05:36 2018
@@ -13,6 +13,7 @@
 
 #include "lldb/Host/ConnectionFileDescriptor.h"
 #include "lldb/Host/Editline.h"
+#include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/LLDBAssert.h"
@@ -172,7 +173,8 @@ private:
 
   const char *GetHistoryFilePath() {
     if (m_path.empty() && m_history && !m_prefix.empty()) {
-      FileSpec parent_path{"~/.lldb", true};
+      FileSpec parent_path("~/.lldb");
+      FileSystem::Instance().Resolve(parent_path);
       char history_path[PATH_MAX];
       if (!llvm::sys::fs::create_directory(parent_path.GetPath())) {
         snprintf(history_path, sizeof(history_path), "~/.lldb/%s-history",
@@ -181,7 +183,9 @@ private:
         snprintf(history_path, sizeof(history_path), "~/%s-widehistory",
                  m_prefix.c_str());
       }
-      m_path = FileSpec(history_path, true).GetPath();
+      auto file_spec = FileSpec(history_path);
+      FileSystem::Instance().Resolve(file_spec);
+      m_path = file_spec.GetPath();
     }
     if (m_path.empty())
       return NULL;

Modified: lldb/trunk/source/Host/common/File.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/File.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/File.cpp (original)
+++ lldb/trunk/source/Host/common/File.cpp Thu Nov  1 14:05:36 2018
@@ -315,7 +315,7 @@ Status File::GetFileSpec(FileSpec &file_
     if (::fcntl(GetDescriptor(), F_GETPATH, path) == -1)
       error.SetErrorToErrno();
     else
-      file_spec.SetFile(path, false, FileSpec::Style::native);
+      file_spec.SetFile(path, FileSpec::Style::native);
   } else {
     error.SetErrorString("invalid file handle");
   }
@@ -330,7 +330,7 @@ Status File::GetFileSpec(FileSpec &file_
       error.SetErrorToErrno();
     else {
       path[len] = '\0';
-      file_spec.SetFile(path, false, FileSpec::Style::native);
+      file_spec.SetFile(path, FileSpec::Style::native);
     }
   }
 #else

Modified: lldb/trunk/source/Host/common/FileSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileSystem.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/FileSystem.cpp (original)
+++ lldb/trunk/source/Host/common/FileSystem.cpp Thu Nov  1 14:05:36 2018
@@ -141,7 +141,7 @@ std::error_code FileSystem::MakeAbsolute
   if (EC)
     return EC;
 
-  FileSpec new_file_spec(path, false, file_spec.GetPathStyle());
+  FileSpec new_file_spec(path, file_spec.GetPathStyle());
   file_spec = new_file_spec;
   return {};
 }
@@ -179,6 +179,7 @@ void FileSystem::Resolve(FileSpec &file_
 
   // Update the FileSpec with the resolved path.
   file_spec.SetPath(path);
+  file_spec.SetIsResolved(true);
 }
 
 bool FileSystem::ResolveExecutableLocation(FileSpec &file_spec) {
@@ -206,7 +207,7 @@ bool FileSystem::ResolveExecutableLocati
     return false;
 
   // Make sure that the result exists.
-  FileSpec result(*error_or_path, false);
+  FileSpec result(*error_or_path);
   if (!Exists(result))
     return false;
 

Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Thu Nov  1 14:05:36 2018
@@ -420,8 +420,10 @@ FileSpec Host::GetModuleFileSpecForHostA
 #if !defined(__ANDROID__)
   Dl_info info;
   if (::dladdr(host_addr, &info)) {
-    if (info.dli_fname)
-      module_filespec.SetFile(info.dli_fname, true, FileSpec::Style::native);
+    if (info.dli_fname) {
+      module_filespec.SetFile(info.dli_fname, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(module_filespec);
+    }
   }
 #endif
   return module_filespec;
@@ -511,7 +513,7 @@ Status Host::RunShellCommand(const Args
     }
   }
 
-  FileSpec output_file_spec{output_file_path.c_str(), false};
+  FileSpec output_file_spec(output_file_path.c_str());
 
   launch_info.AppendSuppressFileAction(STDIN_FILENO, true, false);
   if (output_file_spec) {

Modified: lldb/trunk/source/Host/common/HostInfoBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/HostInfoBase.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/HostInfoBase.cpp (original)
+++ lldb/trunk/source/Host/common/HostInfoBase.cpp Thu Nov  1 14:05:36 2018
@@ -256,7 +256,8 @@ bool HostInfoBase::ComputeProcessTempFil
 bool HostInfoBase::ComputeTempFileBaseDirectory(FileSpec &file_spec) {
   llvm::SmallVector<char, 16> tmpdir;
   llvm::sys::path::system_temp_directory(/*ErasedOnReboot*/ true, tmpdir);
-  file_spec = FileSpec(std::string(tmpdir.data(), tmpdir.size()), true);
+  file_spec = FileSpec(std::string(tmpdir.data(), tmpdir.size()));
+  FileSystem::Instance().Resolve(file_spec);
   return true;
 }
 

Modified: lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp (original)
+++ lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp Thu Nov  1 14:05:36 2018
@@ -35,7 +35,7 @@ MonitoringProcessLauncher::LaunchProcess
   llvm::sys::fs::file_status stats;
   status(exe_spec.GetPath(), stats);
   if (!exists(stats)) {
-    exe_spec.ResolvePath();
+    FileSystem::Instance().Resolve(exe_spec);
     status(exe_spec.GetPath(), stats);
   }
   if (!exists(stats)) {

Modified: lldb/trunk/source/Host/common/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Symbols.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Symbols.cpp (original)
+++ lldb/trunk/source/Host/common/Symbols.cpp Thu Nov  1 14:05:36 2018
@@ -264,20 +264,34 @@ FileSpec Symbols::LocateExecutableSymbol
     FileSystem::Instance().ResolveSymbolicLink(module_file_spec, module_file_spec);
 
     const ConstString &file_dir = module_file_spec.GetDirectory();
-    debug_file_search_paths.AppendIfUnique(
-        FileSpec(file_dir.AsCString("."), true));
+    {
+      FileSpec file_spec(file_dir.AsCString("."));
+      FileSystem::Instance().Resolve(file_spec);
+      debug_file_search_paths.AppendIfUnique(file_spec);
+    }
 
     // Add current working directory.
-    debug_file_search_paths.AppendIfUnique(FileSpec(".", true));
+    {
+      FileSpec file_spec(".");
+      FileSystem::Instance().Resolve(file_spec);
+      debug_file_search_paths.AppendIfUnique(file_spec);
+    }
 
 #ifndef _WIN32
 #if defined(__NetBSD__)
     // Add /usr/libdata/debug directory.
-    debug_file_search_paths.AppendIfUnique(
-        FileSpec("/usr/libdata/debug", true));
+    {
+      FileSpec file_spec("/usr/libdata/debug");
+      FileSystem::Instance().Resolve(file_spec);
+      debug_file_search_paths.AppendIfUnique(file_spec);
+    }
 #else
     // Add /usr/lib/debug directory.
-    debug_file_search_paths.AppendIfUnique(FileSpec("/usr/lib/debug", true));
+    {
+      FileSpec file_spec("/usr/lib/debug");
+      FileSystem::Instance().Resolve(file_spec);
+      debug_file_search_paths.AppendIfUnique(file_spec);
+    }
 #endif
 #endif // _WIN32
 
@@ -296,7 +310,7 @@ FileSpec Symbols::LocateExecutableSymbol
     size_t num_directories = debug_file_search_paths.GetSize();
     for (size_t idx = 0; idx < num_directories; ++idx) {
       FileSpec dirspec = debug_file_search_paths.GetFileSpecAtIndex(idx);
-      dirspec.ResolvePath();
+      FileSystem::Instance().Resolve(dirspec);
       if (!llvm::sys::fs::is_directory(dirspec.GetPath()))
         continue;
 
@@ -315,7 +329,8 @@ FileSpec Symbols::LocateExecutableSymbol
       const uint32_t num_files = files.size();
       for (size_t idx_file = 0; idx_file < num_files; ++idx_file) {
         const std::string &filename = files[idx_file];
-        FileSpec file_spec(filename, true);
+        FileSpec file_spec(filename);
+        FileSystem::Instance().Resolve(file_spec);
 
         if (llvm::sys::fs::equivalent(file_spec.GetPath(),
                                       module_file_spec.GetPath()))

Modified: lldb/trunk/source/Host/linux/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/Host.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/linux/Host.cpp (original)
+++ lldb/trunk/source/Host/linux/Host.cpp Thu Nov  1 14:05:36 2018
@@ -190,8 +190,7 @@ static bool GetProcessAndStatInfo(::pid_
     return false;
 
   process_info.SetProcessID(pid);
-  process_info.GetExecutableFile().SetFile(PathRef, false,
-                                           FileSpec::Style::native);
+  process_info.GetExecutableFile().SetFile(PathRef, FileSpec::Style::native);
 
   llvm::StringRef Rest = Environ->getBuffer();
   while (!Rest.empty()) {

Modified: lldb/trunk/source/Host/linux/HostInfoLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/HostInfoLinux.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/linux/HostInfoLinux.cpp (original)
+++ lldb/trunk/source/Host/linux/HostInfoLinux.cpp Thu Nov  1 14:05:36 2018
@@ -171,7 +171,7 @@ FileSpec HostInfoLinux::GetProgramFileSp
     ssize_t len = readlink("/proc/self/exe", exe_path, sizeof(exe_path) - 1);
     if (len > 0) {
       exe_path[len] = 0;
-      g_program_filespec.SetFile(exe_path, false, FileSpec::Style::native);
+      g_program_filespec.SetFile(exe_path, FileSpec::Style::native);
     }
   }
 
@@ -187,7 +187,8 @@ bool HostInfoLinux::ComputeSupportExeDir
 }
 
 bool HostInfoLinux::ComputeSystemPluginsDirectory(FileSpec &file_spec) {
-  FileSpec temp_file("/usr/lib" LLDB_LIBDIR_SUFFIX "/lldb/plugins", true);
+  FileSpec temp_file("/usr/lib" LLDB_LIBDIR_SUFFIX "/lldb/plugins");
+  FileSystem::Instance().Resolve(temp_file);
   file_spec.GetDirectory().SetCString(temp_file.GetPath().c_str());
   return true;
 }

Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Thu Nov  1 14:05:36 2018
@@ -105,7 +105,9 @@ int LocateMacOSXFilesUsingDebugSymbols(c
                           "UUID %s -- looking for the dSYM",
                           path, uuid->GetAsString().c_str());
             }
-            FileSpec dsym_filespec(path, path[0] == '~');
+            FileSpec dsym_filespec(path);
+            if (path[0] == '~')
+              FileSystem::Instance().Resolve(dsym_filespec);
 
             if (llvm::sys::fs::is_directory(dsym_filespec.GetPath())) {
               dsym_filespec =
@@ -146,7 +148,9 @@ int LocateMacOSXFilesUsingDebugSymbols(c
                             path, uuid->GetAsString().c_str());
               }
               ++items_found;
-              FileSpec exec_filespec(path, path[0] == '~');
+              FileSpec exec_filespec(path);
+              if (path[0] == '~')
+                FileSystem::Instance().Resolve(exec_filespec);
               if (FileSystem::Instance().Exists(exec_filespec)) {
                 success = true;
                 return_module_spec.GetFileSpec() = exec_filespec;
@@ -167,7 +171,8 @@ int LocateMacOSXFilesUsingDebugSymbols(c
                               "bundle with name with name %s",
                               path);
                 }
-                FileSpec file_spec(path, true);
+                FileSpec file_spec(path);
+                FileSystem::Instance().Resolve(file_spec);
                 ModuleSpecList module_specs;
                 ModuleSpec matched_module_spec;
                 using namespace llvm::sys::fs;
@@ -182,7 +187,8 @@ int LocateMacOSXFilesUsingDebugSymbols(c
                     if (::CFURLGetFileSystemRepresentation(bundle_exe_url.get(),
                                                            true, (UInt8 *)path,
                                                            sizeof(path) - 1)) {
-                      FileSpec bundle_exe_file_spec(path, true);
+                      FileSpec bundle_exe_file_spec(path);
+                      FileSystem::Instance().Resolve(bundle_exe_file_spec);
                       if (ObjectFile::GetModuleSpecifications(
                               bundle_exe_file_spec, 0, 0, module_specs) &&
                           module_specs.FindMatchingModuleSpec(
@@ -307,8 +313,8 @@ static bool GetModuleSpecInfoFromUUIDDic
         (CFDictionaryRef)uuid_dict, CFSTR("DBGSymbolRichExecutable"));
     if (cf_str && CFGetTypeID(cf_str) == CFStringGetTypeID()) {
       if (CFCString::FileSystemRepresentation(cf_str, str)) {
-        module_spec.GetFileSpec().SetFile(str.c_str(), true,
-                                          FileSpec::Style::native);
+        module_spec.GetFileSpec().SetFile(str.c_str(), FileSpec::Style::native);
+        FileSystem::Instance().Resolve(module_spec.GetFileSpec());
         if (log) {
           log->Printf(
               "From dsymForUUID plist: Symbol rich executable is at '%s'",
@@ -321,8 +327,9 @@ static bool GetModuleSpecInfoFromUUIDDic
                                                CFSTR("DBGDSYMPath"));
     if (cf_str && CFGetTypeID(cf_str) == CFStringGetTypeID()) {
       if (CFCString::FileSystemRepresentation(cf_str, str)) {
-        module_spec.GetSymbolFileSpec().SetFile(str.c_str(), true,
+        module_spec.GetSymbolFileSpec().SetFile(str.c_str(),
                                                 FileSpec::Style::native);
+        FileSystem::Instance().Resolve(module_spec.GetFileSpec());
         success = true;
         if (log) {
           log->Printf("From dsymForUUID plist: dSYM is at '%s'", str.c_str());
@@ -401,7 +408,8 @@ static bool GetModuleSpecInfoFromUUIDDic
               DBGSourcePath = original_DBGSourcePath_value;
             }
             if (DBGSourcePath[0] == '~') {
-              FileSpec resolved_source_path(DBGSourcePath.c_str(), true);
+              FileSpec resolved_source_path(DBGSourcePath.c_str());
+              FileSystem::Instance().Resolve(resolved_source_path);
               DBGSourcePath = resolved_source_path.GetPath();
             }
             // With version 2 of DBGSourcePathRemapping, we can chop off the
@@ -412,8 +420,8 @@ static bool GetModuleSpecInfoFromUUIDDic
                 ConstString(DBGBuildSourcePath.c_str()),
                 ConstString(DBGSourcePath.c_str()), true);
             if (do_truncate_remapping_names) {
-              FileSpec build_path(DBGBuildSourcePath.c_str(), false);
-              FileSpec source_path(DBGSourcePath.c_str(), false);
+              FileSpec build_path(DBGBuildSourcePath.c_str());
+              FileSpec source_path(DBGSourcePath.c_str());
               build_path.RemoveLastPathComponent();
               build_path.RemoveLastPathComponent();
               source_path.RemoveLastPathComponent();
@@ -449,7 +457,8 @@ static bool GetModuleSpecInfoFromUUIDDic
 
     if (!DBGBuildSourcePath.empty() && !DBGSourcePath.empty()) {
       if (DBGSourcePath[0] == '~') {
-        FileSpec resolved_source_path(DBGSourcePath.c_str(), true);
+        FileSpec resolved_source_path(DBGSourcePath.c_str());
+        FileSystem::Instance().Resolve(resolved_source_path);
         DBGSourcePath = resolved_source_path.GetPath();
       }
       module_spec.GetSourceMappingList().Append(
@@ -505,14 +514,15 @@ bool Symbols::DownloadObjectAndSymbolFil
           getenv("LLDB_APPLE_DSYMFORUUID_EXECUTABLE");
       FileSpec dsym_for_uuid_exe_spec;
       if (dsym_for_uuid_exe_path_cstr) {
-        dsym_for_uuid_exe_spec.SetFile(dsym_for_uuid_exe_path_cstr, true,
+        dsym_for_uuid_exe_spec.SetFile(dsym_for_uuid_exe_path_cstr,
                                        FileSpec::Style::native);
+        FileSystem::Instance().Resolve(dsym_for_uuid_exe_spec);
         g_dsym_for_uuid_exe_exists =
             FileSystem::Instance().Exists(dsym_for_uuid_exe_spec);
       }
 
       if (!g_dsym_for_uuid_exe_exists) {
-        dsym_for_uuid_exe_spec.SetFile("/usr/local/bin/dsymForUUID", false,
+        dsym_for_uuid_exe_spec.SetFile("/usr/local/bin/dsymForUUID",
                                        FileSpec::Style::native);
         g_dsym_for_uuid_exe_exists =
             FileSystem::Instance().Exists(dsym_for_uuid_exe_spec);
@@ -528,7 +538,7 @@ bool Symbols::DownloadObjectAndSymbolFil
                 tilde_rc && tilde_rc->pw_dir) {
               std::string dsymforuuid_path(tilde_rc->pw_dir);
               dsymforuuid_path += "/bin/dsymForUUID";
-              dsym_for_uuid_exe_spec.SetFile(dsymforuuid_path.c_str(), false,
+              dsym_for_uuid_exe_spec.SetFile(dsymforuuid_path.c_str(),
                                              FileSpec::Style::native);
               g_dsym_for_uuid_exe_exists =
                   FileSystem::Instance().Exists(dsym_for_uuid_exe_spec);
@@ -537,8 +547,9 @@ bool Symbols::DownloadObjectAndSymbolFil
         }
       }
       if (!g_dsym_for_uuid_exe_exists && g_dbgshell_command != NULL) {
-        dsym_for_uuid_exe_spec.SetFile(g_dbgshell_command, true,
+        dsym_for_uuid_exe_spec.SetFile(g_dbgshell_command,
                                        FileSpec::Style::native);
+        FileSystem::Instance().Resolve(dsym_for_uuid_exe_spec);
         g_dsym_for_uuid_exe_exists =
             FileSystem::Instance().Exists(dsym_for_uuid_exe_spec);
       }

Modified: lldb/trunk/source/Host/macosx/objcxx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/objcxx/Host.mm?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/objcxx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/objcxx/Host.mm Thu Nov  1 14:05:36 2018
@@ -106,7 +106,7 @@ bool Host::GetBundleDirectory(const File
     if (file.GetPath(path, sizeof(path))) {
       CFCBundle bundle(path);
       if (bundle.GetPath(path, sizeof(path))) {
-        bundle_directory.SetFile(path, false, FileSpec::Style::native);
+        bundle_directory.SetFile(path, FileSpec::Style::native);
         return true;
       }
     }
@@ -126,7 +126,7 @@ bool Host::ResolveExecutableInBundle(Fil
       if (url.get()) {
         if (::CFURLGetFileSystemRepresentation(url.get(), YES, (UInt8 *)path,
                                                sizeof(path))) {
-          file.SetFile(path, false, FileSpec::Style::native);
+          file.SetFile(path, FileSpec::Style::native);
           return true;
         }
       }
@@ -542,8 +542,7 @@ static bool GetMacOSXProcessArgs(const P
            triple_arch == llvm::Triple::x86_64);
       const char *cstr = data.GetCStr(&offset);
       if (cstr) {
-        process_info.GetExecutableFile().SetFile(cstr, false,
-                                                 FileSpec::Style::native);
+        process_info.GetExecutableFile().SetFile(cstr, FileSpec::Style::native);
 
         if (match_info_ptr == NULL ||
             NameMatches(
@@ -1279,7 +1278,7 @@ Status Host::LaunchProcess(ProcessLaunch
   llvm::sys::fs::file_status stats;
   status(exe_spec.GetPath(), stats);
   if (!exists(stats)) {
-    exe_spec.ResolvePath();
+    FileSystem::Instance().Resolve(exe_spec);
     status(exe_spec.GetPath(), stats);
   }
   if (!exists(stats)) {
@@ -1362,7 +1361,7 @@ Status Host::ShellExpandArguments(Proces
             "cwd does not exist; cannot launch with shell argument expansion");
         return error;
       } else {
-        FileSpec working_dir(wd, false);
+        FileSpec working_dir(wd);
         free(wd);
         launch_info.SetWorkingDirectory(working_dir);
       }

Modified: lldb/trunk/source/Host/macosx/objcxx/HostInfoMacOSX.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/objcxx/HostInfoMacOSX.mm?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/objcxx/HostInfoMacOSX.mm (original)
+++ lldb/trunk/source/Host/macosx/objcxx/HostInfoMacOSX.mm Thu Nov  1 14:05:36 2018
@@ -7,8 +7,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "lldb/Host/HostInfo.h"
 #include "lldb/Host/macosx/HostInfoMacOSX.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/Args.h"
 #include "lldb/Utility/Log.h"
 
@@ -96,14 +97,13 @@ FileSpec HostInfoMacOSX::GetProgramFileS
     uint32_t len = sizeof(program_fullpath);
     int err = _NSGetExecutablePath(program_fullpath, &len);
     if (err == 0)
-      g_program_filespec.SetFile(program_fullpath, false,
-                                 FileSpec::Style::native);
+      g_program_filespec.SetFile(program_fullpath, FileSpec::Style::native);
     else if (err == -1) {
       char *large_program_fullpath = (char *)::malloc(len + 1);
 
       err = _NSGetExecutablePath(large_program_fullpath, &len);
       if (err == 0)
-        g_program_filespec.SetFile(large_program_fullpath, false,
+        g_program_filespec.SetFile(large_program_fullpath,
                                    FileSpec::Style::native);
 
       ::free(large_program_fullpath);
@@ -139,7 +139,8 @@ bool HostInfoMacOSX::ComputeSupportExeDi
     // as in the case of a python script, the executable is python, not
     // the lldb driver.
     raw_path.append("/../bin");
-    FileSpec support_dir_spec(raw_path, true);
+    FileSpec support_dir_spec(raw_path);
+    FileSystem::Instance().Resolve(support_dir_spec);
     if (!llvm::sys::fs::is_directory(support_dir_spec.GetPath())) {
       Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
       if (log)
@@ -203,7 +204,8 @@ bool HostInfoMacOSX::ComputeSystemPlugin
 }
 
 bool HostInfoMacOSX::ComputeUserPluginsDirectory(FileSpec &file_spec) {
-  FileSpec temp_file("~/Library/Application Support/LLDB/PlugIns", true);
+  FileSpec temp_file("~/Library/Application Support/LLDB/PlugIns");
+  FileSystem::Instance().Resolve(temp_file);
   file_spec.GetDirectory().SetCString(temp_file.GetPath().c_str());
   return true;
 }

Modified: lldb/trunk/source/Host/posix/FileSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/FileSystem.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/FileSystem.cpp (original)
+++ lldb/trunk/source/Host/posix/FileSystem.cpp Thu Nov  1 14:05:36 2018
@@ -47,7 +47,7 @@ Status FileSystem::Readlink(const FileSp
     error.SetErrorToErrno();
   else {
     buf[count] = '\0'; // Success
-    dst.SetFile(buf, false, FileSpec::Style::native);
+    dst.SetFile(buf, FileSpec::Style::native);
   }
   return error;
 }
@@ -65,7 +65,7 @@ Status FileSystem::ResolveSymbolicLink(c
     return err;
   }
 
-  dst = FileSpec(real_path, false);
+  dst = FileSpec(real_path);
 
   return Status();
 }

Modified: lldb/trunk/source/Host/posix/HostInfoPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostInfoPosix.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/HostInfoPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostInfoPosix.cpp Thu Nov  1 14:05:36 2018
@@ -119,7 +119,7 @@ uint32_t HostInfoPosix::GetEffectiveUser
 
 uint32_t HostInfoPosix::GetEffectiveGroupID() { return getegid(); }
 
-FileSpec HostInfoPosix::GetDefaultShell() { return FileSpec("/bin/sh", false); }
+FileSpec HostInfoPosix::GetDefaultShell() { return FileSpec("/bin/sh"); }
 
 bool HostInfoPosix::ComputePathRelativeToLibrary(FileSpec &file_spec,
                                                  llvm::StringRef dir) {
@@ -163,7 +163,7 @@ bool HostInfoPosix::ComputeSupportExeDir
 }
 
 bool HostInfoPosix::ComputeHeaderDirectory(FileSpec &file_spec) {
-  FileSpec temp_file("/opt/local/include/lldb", false);
+  FileSpec temp_file("/opt/local/include/lldb");
   file_spec.GetDirectory().SetCString(temp_file.GetPath().c_str());
   return true;
 }

Modified: lldb/trunk/source/Host/posix/HostProcessPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostProcessPosix.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/HostProcessPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostProcessPosix.cpp Thu Nov  1 14:05:36 2018
@@ -62,7 +62,7 @@ Status HostProcessPosix::GetMainModule(F
     return error;
   }
 
-  error = FileSystem::Instance().Readlink(FileSpec{link_path, false}, file_spec);
+  error = FileSystem::Instance().Readlink(FileSpec(link_path), file_spec);
   if (!error.Success())
     return error;
 

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Thu Nov  1 14:05:36 2018
@@ -2087,12 +2087,13 @@ void CommandInterpreter::SourceInitFile(
       LoadCWDlldbinitFile should_load =
           target->TargetProperties::GetLoadCWDlldbinitFile();
       if (should_load == eLoadCWDlldbinitWarn) {
-        FileSpec dot_lldb(".lldbinit", true);
+        FileSpec dot_lldb(".lldbinit");
+        FileSystem::Instance().Resolve(dot_lldb);
         llvm::SmallString<64> home_dir_path;
         llvm::sys::path::home_directory(home_dir_path);
-        FileSpec homedir_dot_lldb(home_dir_path.c_str(), false);
+        FileSpec homedir_dot_lldb(home_dir_path.c_str());
         homedir_dot_lldb.AppendPathComponent(".lldbinit");
-        homedir_dot_lldb.ResolvePath();
+        FileSystem::Instance().Resolve(homedir_dot_lldb);
         if (FileSystem::Instance().Exists(dot_lldb) &&
             dot_lldb.GetDirectory() != homedir_dot_lldb.GetDirectory()) {
           result.AppendErrorWithFormat(
@@ -2111,7 +2112,8 @@ void CommandInterpreter::SourceInitFile(
           return;
         }
       } else if (should_load == eLoadCWDlldbinitTrue) {
-        init_file.SetFile("./.lldbinit", true, FileSpec::Style::native);
+        init_file.SetFile("./.lldbinit", FileSpec::Style::native);
+        FileSystem::Instance().Resolve(init_file);
       }
     }
   } else {
@@ -2123,7 +2125,7 @@ void CommandInterpreter::SourceInitFile(
     // init files.
     llvm::SmallString<64> home_dir_path;
     llvm::sys::path::home_directory(home_dir_path);
-    FileSpec profilePath(home_dir_path.c_str(), false);
+    FileSpec profilePath(home_dir_path.c_str());
     profilePath.AppendPathComponent(".lldbinit");
     std::string init_file_path = profilePath.GetPath();
 
@@ -2135,15 +2137,15 @@ void CommandInterpreter::SourceInitFile(
         char program_init_file_name[PATH_MAX];
         ::snprintf(program_init_file_name, sizeof(program_init_file_name),
                    "%s-%s", init_file_path.c_str(), program_name);
-        init_file.SetFile(program_init_file_name, true,
-                          FileSpec::Style::native);
+        init_file.SetFile(program_init_file_name, FileSpec::Style::native);
+        FileSystem::Instance().Resolve(init_file);
         if (!FileSystem::Instance().Exists(init_file))
           init_file.Clear();
       }
     }
 
     if (!init_file && !m_skip_lldbinit_files)
-      init_file.SetFile(init_file_path, false, FileSpec::Style::native);
+      init_file.SetFile(init_file_path, FileSpec::Style::native);
   }
 
   // If the file exists, tell HandleCommand to 'source' it; this will do the

Modified: lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp Thu Nov  1 14:05:36 2018
@@ -75,7 +75,9 @@ Status OptionValueFileSpec::SetValueFrom
       // or whitespace.
       value = value.trim("\"' \t");
       m_value_was_set = true;
-      m_current_value.SetFile(value.str(), m_resolve, FileSpec::Style::native);
+      m_current_value.SetFile(value.str(), FileSpec::Style::native);
+      if (m_resolve)
+        FileSystem::Instance().Resolve(m_current_value);
       m_data_sp.reset();
       m_data_mod_time = llvm::sys::TimePoint<>();
       NotifyValueChanged();

Modified: lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp Thu Nov  1 14:05:36 2018
@@ -69,7 +69,7 @@ Status OptionValueFileSpecList::SetValue
             count);
       } else {
         for (size_t i = 1; i < argc; ++i, ++idx) {
-          FileSpec file(args.GetArgumentAtIndex(i), false);
+          FileSpec file(args.GetArgumentAtIndex(i));
           if (idx < count)
             m_current_value.Replace(idx, file);
           else
@@ -91,7 +91,7 @@ Status OptionValueFileSpecList::SetValue
     if (argc > 0) {
       m_value_was_set = true;
       for (size_t i = 0; i < argc; ++i) {
-        FileSpec file(args.GetArgumentAtIndex(i), false);
+        FileSpec file(args.GetArgumentAtIndex(i));
         m_current_value.Append(file);
       }
       NotifyValueChanged();
@@ -115,7 +115,7 @@ Status OptionValueFileSpecList::SetValue
         if (op == eVarSetOperationInsertAfter)
           ++idx;
         for (size_t i = 1; i < argc; ++i, ++idx) {
-          FileSpec file(args.GetArgumentAtIndex(i), false);
+          FileSpec file(args.GetArgumentAtIndex(i));
           m_current_value.Insert(idx, file);
         }
         NotifyValueChanged();

Modified: lldb/trunk/source/Interpreter/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Options.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Options.cpp (original)
+++ lldb/trunk/source/Interpreter/Options.cpp Thu Nov  1 14:05:36 2018
@@ -831,7 +831,7 @@ bool Options::HandleOptionArgumentComple
         const char *module_name =
             request.GetParsedLine().GetArgumentAtIndex(cur_arg_pos);
         if (module_name) {
-          FileSpec module_spec(module_name, false);
+          FileSpec module_spec(module_name);
           lldb::TargetSP target_sp =
               interpreter.GetDebugger().GetSelectedTarget();
           // Search filters require a target...

Modified: lldb/trunk/source/Interpreter/Property.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Property.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Property.cpp (original)
+++ lldb/trunk/source/Interpreter/Property.cpp Thu Nov  1 14:05:36 2018
@@ -102,8 +102,10 @@ Property::Property(const PropertyDefinit
     // "definition.default_uint_value" represents if the
     // "definition.default_cstr_value" should be resolved or not
     const bool resolve = definition.default_uint_value != 0;
-    m_value_sp.reset(new OptionValueFileSpec(
-        FileSpec(definition.default_cstr_value, resolve), resolve));
+    FileSpec file_spec = FileSpec(definition.default_cstr_value);
+    if (resolve)
+      FileSystem::Instance().Resolve(file_spec);
+    m_value_sp.reset(new OptionValueFileSpec(file_spec, resolve));
     break;
   }
 

Modified: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Thu Nov  1 14:05:36 2018
@@ -435,8 +435,8 @@ DynamicLoaderDarwinKernel::CheckForKerne
   if (header.filetype == llvm::MachO::MH_EXECUTE &&
       (header.flags & llvm::MachO::MH_DYLDLINK) == 0) {
     // Create a full module to get the UUID
-    ModuleSP memory_module_sp = process->ReadModuleFromMemory(
-        FileSpec("temp_mach_kernel", false), addr);
+    ModuleSP memory_module_sp =
+        process->ReadModuleFromMemory(FileSpec("temp_mach_kernel"), addr);
     if (!memory_module_sp.get())
       return UUID();
 
@@ -646,8 +646,7 @@ bool DynamicLoaderDarwinKernel::KextImag
   if (m_load_address == LLDB_INVALID_ADDRESS)
     return false;
 
-  FileSpec file_spec;
-  file_spec.SetFile(m_name.c_str(), false, FileSpec::Style::native);
+  FileSpec file_spec(m_name.c_str());
 
   llvm::MachO::mach_header mh;
   size_t size_to_read = 512;
@@ -807,7 +806,7 @@ bool DynamicLoaderDarwinKernel::KextImag
             PlatformDarwinKernel::GetPluginNameStatic());
         if (platform_name == g_platform_name) {
           ModuleSpec kext_bundle_module_spec(module_spec);
-          FileSpec kext_filespec(m_name.c_str(), false);
+          FileSpec kext_filespec(m_name.c_str());
           kext_bundle_module_spec.GetFileSpec() = kext_filespec;
           platform_sp->GetSharedModule(
               kext_bundle_module_spec, process, m_module_sp,

Modified: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp Thu Nov  1 14:05:36 2018
@@ -367,7 +367,8 @@ void DynamicLoaderHexagonDYLD::RefreshMo
 
     E = m_rendezvous.loaded_end();
     for (I = m_rendezvous.loaded_begin(); I != E; ++I) {
-      FileSpec file(I->path, true);
+      FileSpec file(I->path);
+      FileSystem::Instance().Resolve(file);
       ModuleSP module_sp =
           LoadModuleAtAddress(file, I->link_addr, I->base_addr, true);
       if (module_sp.get()) {
@@ -391,7 +392,8 @@ void DynamicLoaderHexagonDYLD::RefreshMo
 
     E = m_rendezvous.unloaded_end();
     for (I = m_rendezvous.unloaded_begin(); I != E; ++I) {
-      FileSpec file(I->path, true);
+      FileSpec file(I->path);
+      FileSystem::Instance().Resolve(file);
       ModuleSpec module_spec(file);
       ModuleSP module_sp = loaded_modules.FindFirstModule(module_spec);
 
@@ -485,7 +487,7 @@ void DynamicLoaderHexagonDYLD::LoadAllCu
 
   for (I = m_rendezvous.begin(), E = m_rendezvous.end(); I != E; ++I) {
     const char *module_path = I->path.c_str();
-    FileSpec file(module_path, false);
+    FileSpec file(module_path);
     ModuleSP module_sp =
         LoadModuleAtAddress(file, I->link_addr, I->base_addr, true);
     if (module_sp.get()) {

Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp Thu Nov  1 14:05:36 2018
@@ -374,7 +374,7 @@ bool DynamicLoaderDarwin::JSONImageInfor
     image_infos[i].mod_date =
         image->GetValueForKey("mod_date")->GetAsInteger()->GetValue();
     image_infos[i].file_spec.SetFile(
-        image->GetValueForKey("pathname")->GetAsString()->GetValue(), false,
+        image->GetValueForKey("pathname")->GetAsString()->GetValue(),
         FileSpec::Style::native);
 
     StructuredData::Dictionary *mh =

Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Thu Nov  1 14:05:36 2018
@@ -693,9 +693,7 @@ bool DynamicLoaderMacOSXDYLD::ReadImageI
                                        error);
       // don't resolve the path
       if (error.Success()) {
-        const bool resolve_path = false;
-        image_infos[i].file_spec.SetFile(raw_path, resolve_path,
-                                         FileSpec::Style::native);
+        image_infos[i].file_spec.SetFile(raw_path, FileSpec::Style::native);
       }
     }
     return true;
@@ -894,7 +892,8 @@ uint32_t DynamicLoaderMacOSXDYLD::ParseL
           const lldb::offset_t name_offset =
               load_cmd_offset + data.GetU32(&offset);
           const char *path = data.PeekCStr(name_offset);
-          lc_id_dylinker->SetFile(path, true, FileSpec::Style::native);
+          lc_id_dylinker->SetFile(path, FileSpec::Style::native);
+          FileSystem::Instance().Resolve(*lc_id_dylinker);
         }
         break;
 

Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp Thu Nov  1 14:05:36 2018
@@ -243,7 +243,7 @@ bool DYLDRendezvous::FillSOEntryFromModu
   entry.base_addr = base_addr;
   entry.dyn_addr = dyn_addr;
 
-  entry.file_spec.SetFile(name, false, FileSpec::Style::native);
+  entry.file_spec.SetFile(name, FileSpec::Style::native);
 
   UpdateBaseAddrIfNecessary(entry, name);
 
@@ -517,7 +517,7 @@ bool DYLDRendezvous::ReadSOEntryFromMemo
     return false;
 
   std::string file_path = ReadStringFromMemory(entry.path_addr);
-  entry.file_spec.SetFile(file_path, false, FileSpec::Style::native);
+  entry.file_spec.SetFile(file_path, FileSpec::Style::native);
 
   UpdateBaseAddrIfNecessary(entry, file_path);
 

Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Thu Nov  1 14:05:36 2018
@@ -512,7 +512,7 @@ void DynamicLoaderPOSIXDYLD::LoadVDSO()
   if (m_vdso_base == LLDB_INVALID_ADDRESS)
     return;
 
-  FileSpec file("[vdso]", false);
+  FileSpec file("[vdso]");
 
   MemoryRegionInfo info;
   Status status = m_process->GetMemoryRegionInfo(m_vdso_base, info);
@@ -543,7 +543,7 @@ ModuleSP DynamicLoaderPOSIXDYLD::LoadInt
     return nullptr;
   }
 
-  FileSpec file(info.GetName().GetCString(), false);
+  FileSpec file(info.GetName().GetCString());
   ModuleSpec module_spec(file, target.GetArchitecture());
 
   if (ModuleSP module_sp = target.GetSharedModule(module_spec)) {

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Thu Nov  1 14:05:36 2018
@@ -18,6 +18,7 @@
 #include "llvm/Support/Threading.h"
 
 // Project includes
+#include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
 #if !defined(_WIN32)
 #include "lldb/Host/posix/HostInfoPosix.h"
@@ -84,7 +85,8 @@ bool lldb_private::ComputeClangDirectory
                             "Developer/Toolchains/XcodeDefault.xctoolchain",
                             swift_clang_resource_dir);
     if (!verify || VerifyClangPath(clang_path)) {
-      file_spec.SetFile(clang_path.c_str(), true, FileSpec::Style::native);
+      file_spec.SetFile(clang_path.c_str(), FileSpec::Style::native);
+      FileSystem::Instance().Resolve(file_spec);
       return true;
     }
   } else if (parent != r_end && *parent == "PrivateFrameworks" &&
@@ -98,7 +100,8 @@ bool lldb_private::ComputeClangDirectory
       raw_path.resize(parent - r_end);
       llvm::sys::path::append(clang_path, raw_path, swift_clang_resource_dir);
       if (!verify || VerifyClangPath(clang_path)) {
-        file_spec.SetFile(clang_path.c_str(), true, FileSpec::Style::native);
+        file_spec.SetFile(clang_path.c_str(), FileSpec::Style::native);
+        FileSystem::Instance().Resolve(file_spec);
         return true;
       }
       raw_path = lldb_shlib_spec.GetPath();
@@ -110,7 +113,8 @@ bool lldb_private::ComputeClangDirectory
 
   // Fall back to the Clang resource directory inside the framework.
   raw_path.append("LLDB.framework/Resources/Clang");
-  file_spec.SetFile(raw_path.c_str(), true, FileSpec::Style::native);
+  file_spec.SetFile(raw_path.c_str(), FileSpec::Style::native);
+  FileSystem::Instance().Resolve(file_spec);
   return true;
 }
 

Modified: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp (original)
+++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp Thu Nov  1 14:05:36 2018
@@ -315,7 +315,7 @@ bool JITLoaderGDB::ReadJITDescriptorImpl
       char jit_name[64];
       snprintf(jit_name, 64, "JIT(0x%" PRIx64 ")", symbolfile_addr);
       module_sp = m_process->ReadModuleFromMemory(
-          FileSpec(jit_name, false), symbolfile_addr, symbolfile_size);
+          FileSpec(jit_name), symbolfile_addr, symbolfile_size);
 
       if (module_sp && module_sp->GetObjectFile()) {
         // load the symbol table right away

Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Thu Nov  1 14:05:36 2018
@@ -483,8 +483,8 @@ lldb::SearchFilterSP ItaniumABILanguageR
     // Limit the number of modules that are searched for these breakpoints for
     // Apple binaries.
     FileSpecList filter_modules;
-    filter_modules.Append(FileSpec("libc++abi.dylib", false));
-    filter_modules.Append(FileSpec("libSystem.B.dylib", false));
+    filter_modules.Append(FileSpec("libc++abi.dylib"));
+    filter_modules.Append(FileSpec("libSystem.B.dylib"));
     return target.GetSearchFilterForModuleList(&filter_modules);
   } else {
     return LanguageRuntime::CreateExceptionSearchFilter();

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp Thu Nov  1 14:05:36 2018
@@ -455,7 +455,7 @@ lldb::SearchFilterSP AppleObjCRuntime::C
 
   if (target.GetArchitecture().GetTriple().getVendor() == llvm::Triple::Apple) {
     FileSpecList filter_modules;
-    filter_modules.Append(FileSpec("libobjc.A.dylib", false));
+    filter_modules.Append(FileSpec("libobjc.A.dylib"));
     return target.GetSearchFilterForModuleList(&filter_modules);
   } else {
     return LanguageRuntime::CreateExceptionSearchFilter();

Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Thu Nov  1 14:05:36 2018
@@ -2529,7 +2529,8 @@ bool RenderScriptRuntime::LoadAllocation
          "Allocation information not available");
 
   // Check we can read from file
-  FileSpec file(path, true);
+  FileSpec file(path);
+  FileSystem::Instance().Resolve(file);
   if (!FileSystem::Instance().Exists(file)) {
     strm.Printf("Error: File %s does not exist", path);
     strm.EOL();
@@ -2753,7 +2754,8 @@ bool RenderScriptRuntime::SaveAllocation
          "Allocation information not available");
 
   // Check we can create writable file
-  FileSpec file_spec(path, true);
+  FileSpec file_spec(path);
+  FileSystem::Instance().Resolve(file_spec);
   File file(file_spec, File::eOpenOptionWrite | File::eOpenOptionCanCreate |
                            File::eOpenOptionTruncate);
   if (!file) {
@@ -4651,7 +4653,8 @@ public:
 
       switch (short_option) {
       case 'f':
-        m_outfile.SetFile(option_arg, true, FileSpec::Style::native);
+        m_outfile.SetFile(option_arg, FileSpec::Style::native);
+        FileSystem::Instance().Resolve(m_outfile);
         if (FileSystem::Instance().Exists(m_outfile)) {
           m_outfile.Clear();
           err.SetErrorStringWithFormat("file already exists: '%s'",

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Thu Nov  1 14:05:36 2018
@@ -955,7 +955,7 @@ lldb_private::FileSpecList ObjectFileELF
   FileSpecList file_spec_list;
 
   if (!m_gnu_debuglink_file.empty()) {
-    FileSpec file_spec(m_gnu_debuglink_file, false);
+    FileSpec file_spec(m_gnu_debuglink_file);
     file_spec_list.Append(file_spec);
   }
   return file_spec_list;
@@ -1109,7 +1109,9 @@ size_t ObjectFileELF::ParseDependentModu
 
       uint32_t str_index = static_cast<uint32_t>(symbol.d_val);
       const char *lib_name = dynstr_data.PeekCStr(str_index);
-      m_filespec_ap->Append(FileSpec(lib_name, true));
+      FileSpec file_spec(lib_name);
+      FileSystem::Instance().Resolve(file_spec);
+      m_filespec_ap->Append(file_spec);
     }
   }
 

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Thu Nov  1 14:05:36 2018
@@ -2183,7 +2183,7 @@ size_t ObjectFileMachO::ParseSymtab() {
       uint32_t name_offset = cmd_offset + m_data.GetU32(&offset);
       const char *path = m_data.PeekCStr(name_offset);
       if (path) {
-        FileSpec file_spec(path, false);
+        FileSpec file_spec(path);
         // Strip the path if there is @rpath, @executable, etc so we just use
         // the basename
         if (path[0] == '@')
@@ -4017,9 +4017,9 @@ size_t ObjectFileMachO::ParseSymtab() {
                     // string in the DW_AT_comp_dir, and the second is the
                     // directory for the source file so you end up with a path
                     // that looks like "/tmp/src//tmp/src/"
-                    FileSpec so_dir(so_path, false);
+                    FileSpec so_dir(so_path);
                     if (!FileSystem::Instance().Exists(so_dir)) {
-                      so_dir.SetFile(&full_so_path[double_slash_pos + 1], false,
+                      so_dir.SetFile(&full_so_path[double_slash_pos + 1],
                                      FileSpec::Style::native);
                       if (FileSystem::Instance().Exists(so_dir)) {
                         // Trim off the incorrect path
@@ -5084,9 +5084,6 @@ uint32_t ObjectFileMachO::GetDependentMo
     std::vector<std::string> rpath_paths;
     std::vector<std::string> rpath_relative_paths;
     std::vector<std::string> at_exec_relative_paths;
-    const bool resolve_path = false; // Don't resolve the dependent file paths
-                                     // since they may not reside on this
-                                     // system
     uint32_t i;
     for (i = 0; i < m_header.ncmds; ++i) {
       const uint32_t cmd_offset = offset;
@@ -5115,7 +5112,7 @@ uint32_t ObjectFileMachO::GetDependentMo
                 at_exec_relative_paths.push_back(path 
                                                  + strlen("@executable_path"));
             } else {
-              FileSpec file_spec(path, resolve_path);
+              FileSpec file_spec(path);
               if (files.AppendIfUnique(file_spec))
                 count++;
             }
@@ -5130,8 +5127,8 @@ uint32_t ObjectFileMachO::GetDependentMo
     }
 
     FileSpec this_file_spec(m_file);
-    this_file_spec.ResolvePath();
-    
+    FileSystem::Instance().Resolve(this_file_spec);
+
     if (!rpath_paths.empty()) {
       // Fixup all LC_RPATH values to be absolute paths
       std::string loader_path("@loader_path");
@@ -5152,7 +5149,8 @@ uint32_t ObjectFileMachO::GetDependentMo
           path += rpath_relative_path;
           // It is OK to resolve this path because we must find a file on disk
           // for us to accept it anyway if it is rpath relative.
-          FileSpec file_spec(path, true);
+          FileSpec file_spec(path);
+          FileSystem::Instance().Resolve(file_spec);
           if (FileSystem::Instance().Exists(file_spec) &&
               files.AppendIfUnique(file_spec)) {
             count++;

Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp Thu Nov  1 14:05:36 2018
@@ -193,7 +193,7 @@ Status PlatformAndroid::GetFile(const Fi
   if (IsHost() || !m_remote_platform_sp)
     return PlatformLinux::GetFile(source, destination);
 
-  FileSpec source_spec(source.GetPath(false), false, FileSpec::Style::posix);
+  FileSpec source_spec(source.GetPath(false), FileSpec::Style::posix);
   if (source_spec.IsRelative())
     source_spec = GetRemoteWorkingDirectory().CopyByAppendingPathComponent(
         source_spec.GetCString(false));
@@ -237,8 +237,7 @@ Status PlatformAndroid::PutFile(const Fi
   if (IsHost() || !m_remote_platform_sp)
     return PlatformLinux::PutFile(source, destination, uid, gid);
 
-  FileSpec destination_spec(destination.GetPath(false), false,
-                            FileSpec::Style::posix);
+  FileSpec destination_spec(destination.GetPath(false), FileSpec::Style::posix);
   if (destination_spec.IsRelative())
     destination_spec = GetRemoteWorkingDirectory().CopyByAppendingPathComponent(
         destination_spec.GetCString(false));
@@ -343,7 +342,7 @@ Status PlatformAndroid::DownloadSymbolFi
       log->Printf("Failed to remove temp directory: %s", error.AsCString());
   });
 
-  FileSpec symfile_platform_filespec(tmpdir, false);
+  FileSpec symfile_platform_filespec(tmpdir);
   symfile_platform_filespec.AppendPathComponent("symbolized.oat");
 
   // Execute oatdump on the remote device to generate a file with symtab

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp Thu Nov  1 14:05:36 2018
@@ -229,9 +229,8 @@ FileSpec PlatformAppleSimulator::GetCore
       cs_path.Printf(
           "%s/Library/PrivateFrameworks/CoreSimulator.framework/CoreSimulator",
           developer_dir);
-      const bool resolve_path = true;
-      m_core_simulator_framework_path =
-          FileSpec(cs_path.GetData(), resolve_path);
+      m_core_simulator_framework_path = FileSpec(cs_path.GetData());
+      FileSystem::Instance().Resolve(*m_core_simulator_framework_path);
     }
   }
 

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp Thu Nov  1 14:05:36 2018
@@ -251,7 +251,7 @@ static FileSystem::EnumerateDirectoryRes
 EnumerateDirectoryCallback(void *baton, llvm::sys::fs::file_type ft,
                            llvm::StringRef path) {
   if (ft == llvm::sys::fs::file_type::directory_file) {
-    FileSpec file_spec(path, false);
+    FileSpec file_spec(path);
     const char *filename = file_spec.GetFilename().GetCString();
     if (filename &&
         strncmp(filename, "AppleTVSimulator", strlen("AppleTVSimulator")) ==
@@ -316,12 +316,14 @@ Status PlatformAppleTVSimulator::GetSymb
                  platform_file_path);
 
       // First try in the SDK and see if the file is in there
-      local_file.SetFile(resolved_path, true, FileSpec::Style::native);
+      local_file.SetFile(resolved_path, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file))
         return error;
 
       // Else fall back to the actual path itself
-      local_file.SetFile(platform_file_path, true, FileSpec::Style::native);
+      local_file.SetFile(platform_file_path, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file))
         return error;
     }

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp Thu Nov  1 14:05:36 2018
@@ -251,7 +251,7 @@ static FileSystem::EnumerateDirectoryRes
 EnumerateDirectoryCallback(void *baton, llvm::sys::fs::file_type ft,
                            llvm::StringRef path) {
   if (ft == llvm::sys::fs::file_type::directory_file) {
-    FileSpec file_spec(path, false);
+    FileSpec file_spec(path);
     const char *filename = file_spec.GetFilename().GetCString();
     if (filename &&
         strncmp(filename, "AppleWatchSimulator",
@@ -316,12 +316,14 @@ Status PlatformAppleWatchSimulator::GetS
                  platform_file_path);
 
       // First try in the SDK and see if the file is in there
-      local_file.SetFile(resolved_path, true, FileSpec::Style::native);
+      local_file.SetFile(resolved_path, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file))
         return error;
 
       // Else fall back to the actual path itself
-      local_file.SetFile(platform_file_path, true, FileSpec::Style::native);
+      local_file.SetFile(platform_file_path, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file))
         return error;
     }

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Thu Nov  1 14:05:36 2018
@@ -130,9 +130,10 @@ FileSpecList PlatformDarwin::LocateExecu
                     "%s/../Python/%s.py",
                     symfile_spec.GetDirectory().GetCString(),
                     original_module_basename.c_str());
-                FileSpec script_fspec(path_string.GetString(), true);
-                FileSpec orig_script_fspec(original_path_string.GetString(),
-                                           true);
+                FileSpec script_fspec(path_string.GetString());
+                FileSystem::Instance().Resolve(script_fspec);
+                FileSpec orig_script_fspec(original_path_string.GetString());
+                FileSystem::Instance().Resolve(orig_script_fspec);
 
                 // if we did some replacements of reserved characters, and a
                 // file with the untampered name exists, then warn the user
@@ -261,7 +262,7 @@ lldb_private::Status PlatformDarwin::Get
     if (!cache_path.empty()) {
       std::string module_path(module_spec.GetFileSpec().GetPath());
       cache_path.append(module_path);
-      FileSpec module_cache_spec(cache_path, false);
+      FileSpec module_cache_spec(cache_path);
 
       // if rsync is supported, always bring in the file - rsync will be very
       // efficient when files are the same on the local and remote end of the
@@ -412,7 +413,7 @@ Status PlatformDarwin::GetSharedModule(
               snprintf(new_path + search_path_len,
                        sizeof(new_path) - search_path_len, "/%s",
                        platform_path + bundle_directory_len);
-              FileSpec new_file_spec(new_path, false);
+              FileSpec new_file_spec(new_path);
               if (FileSystem::Instance().Exists(new_file_spec)) {
                 ModuleSpec new_module_spec(module_spec);
                 new_module_spec.GetFileSpec() = new_file_spec;
@@ -1167,7 +1168,7 @@ const char *PlatformDarwin::GetDeveloper
       if (xcode_select_prefix_dir)
         xcode_dir_path.append(xcode_select_prefix_dir);
       xcode_dir_path.append("/usr/share/xcode-select/xcode_dir_path");
-      temp_file_spec.SetFile(xcode_dir_path, false, FileSpec::Style::native);
+      temp_file_spec.SetFile(xcode_dir_path, FileSpec::Style::native);
       auto dir_buffer =
           DataBufferLLVM::CreateFromPath(temp_file_spec.GetPath());
       if (dir_buffer && dir_buffer->GetByteSize() > 0) {
@@ -1183,7 +1184,7 @@ const char *PlatformDarwin::GetDeveloper
     }
 
     if (!developer_dir_path_valid) {
-      FileSpec xcode_select_cmd("/usr/bin/xcode-select", false);
+      FileSpec xcode_select_cmd("/usr/bin/xcode-select");
       if (FileSystem::Instance().Exists(xcode_select_cmd)) {
         int exit_status = -1;
         int signo = -1;
@@ -1206,7 +1207,7 @@ const char *PlatformDarwin::GetDeveloper
           }
           developer_dir_path[i] = '\0';
 
-          FileSpec devel_dir(developer_dir_path, false);
+          FileSpec devel_dir(developer_dir_path);
           if (llvm::sys::fs::is_directory(devel_dir.GetPath())) {
             developer_dir_path_valid = true;
           }
@@ -1215,8 +1216,7 @@ const char *PlatformDarwin::GetDeveloper
     }
 
     if (developer_dir_path_valid) {
-      temp_file_spec.SetFile(developer_dir_path, false,
-                             FileSpec::Style::native);
+      temp_file_spec.SetFile(developer_dir_path, FileSpec::Style::native);
       if (FileSystem::Instance().Exists(temp_file_spec)) {
         m_developer_directory.assign(developer_dir_path);
         return m_developer_directory.c_str();
@@ -1247,7 +1247,7 @@ BreakpointSP PlatformDarwin::SetThreadCr
   FileSpecList bp_modules;
   for (size_t i = 0; i < llvm::array_lengthof(g_bp_modules); i++) {
     const char *bp_module = g_bp_modules[i];
-    bp_modules.Append(FileSpec(bp_module, false));
+    bp_modules.Append(FileSpec(bp_module));
   }
 
   bool internal = true;
@@ -1307,7 +1307,7 @@ static FileSpec CheckPathForXcode(const
     size_t pos = path_to_shlib.rfind(substr);
     if (pos != std::string::npos) {
       path_to_shlib.erase(pos + strlen(substr));
-      FileSpec ret(path_to_shlib, false);
+      FileSpec ret(path_to_shlib);
 
       FileSpec xcode_binary_path = ret;
       xcode_binary_path.AppendPathComponent("MacOS");
@@ -1348,8 +1348,9 @@ static FileSpec GetXcodeContentsPath() {
     if (!g_xcode_filespec) {
       const char *developer_dir_env_var = getenv("DEVELOPER_DIR");
       if (developer_dir_env_var && developer_dir_env_var[0]) {
-        g_xcode_filespec =
-            CheckPathForXcode(FileSpec(developer_dir_env_var, true));
+        FileSpec developer_dir_spec = FileSpec(developer_dir_env_var);
+        FileSystem::Instance().Resolve(developer_dir_spec);
+        g_xcode_filespec = CheckPathForXcode(developer_dir_spec);
       }
 
       // Fall back to using "xcrun" to find the selected Xcode
@@ -1373,7 +1374,7 @@ static FileSpec GetXcodeContentsPath() {
           }
           output.append("/..");
 
-          g_xcode_filespec = CheckPathForXcode(FileSpec(output, false));
+          g_xcode_filespec = CheckPathForXcode(FileSpec(output));
         }
       }
     }
@@ -1421,7 +1422,7 @@ FileSystem::EnumerateDirectoryResult Pla
     void *baton, llvm::sys::fs::file_type file_type, llvm::StringRef path) {
   SDKEnumeratorInfo *enumerator_info = static_cast<SDKEnumeratorInfo *>(baton);
 
-  FileSpec spec(path, false);
+  FileSpec spec(path);
   if (SDKSupportsModules(enumerator_info->sdk_type, spec)) {
     enumerator_info->found_path = spec;
     return FileSystem::EnumerateDirectoryResult::eEnumerateDirectoryResultNext;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp Thu Nov  1 14:05:36 2018
@@ -377,12 +377,15 @@ void PlatformDarwinKernel::CollectKextAn
   GetUserSpecifiedDirectoriesToSearch();
 
   // Add simple directory /Applications/Xcode.app/Contents/Developer/../Symbols
-  FileSpec possible_dir(developer_dir + "/../Symbols", true);
+  FileSpec possible_dir(developer_dir + "/../Symbols");
+  FileSystem::Instance().Resolve(possible_dir);
   if (llvm::sys::fs::is_directory(possible_dir.GetPath()))
     m_search_directories.push_back(possible_dir);
 
   // Add simple directory of the current working directory
-  m_search_directories_no_recursing.push_back(FileSpec(".", true));
+  FileSpec cwd(".");
+  FileSystem::Instance().Resolve(cwd);
+  m_search_directories_no_recursing.push_back(cwd);
 }
 
 void PlatformDarwinKernel::GetUserSpecifiedDirectoriesToSearch() {
@@ -392,7 +395,7 @@ void PlatformDarwinKernel::GetUserSpecif
   const uint32_t user_dirs_count = user_dirs.GetSize();
   for (uint32_t i = 0; i < user_dirs_count; i++) {
     FileSpec dir = user_dirs.GetFileSpecAtIndex(i);
-    dir.ResolvePath();
+    FileSystem::Instance().Resolve(dir);
     if (llvm::sys::fs::is_directory(dir.GetPath())) {
       m_search_directories.push_back(dir);
     }
@@ -408,14 +411,14 @@ void PlatformDarwinKernel::AddRootSubdir
                                         // /AppleInternal/Developer/KDKs/*.kdk/...
       nullptr};
   for (int i = 0; subdirs[i] != nullptr; i++) {
-    FileSpec testdir(dir + subdirs[i], true);
+    FileSpec testdir(dir + subdirs[i]);
+    FileSystem::Instance().Resolve(testdir);
     if (llvm::sys::fs::is_directory(testdir.GetPath()))
       thisp->m_search_directories.push_back(testdir);
   }
 
   // Look for kernel binaries in the top level directory, without any recursion
-  thisp->m_search_directories_no_recursing.push_back(
-      FileSpec(dir + "/", false));
+  thisp->m_search_directories_no_recursing.push_back(FileSpec(dir + "/"));
 }
 
 // Given a directory path dir, look for any subdirs named *.kdk and *.sdk
@@ -437,7 +440,7 @@ PlatformDarwinKernel::FindKDKandSDKDirec
   static ConstString g_kdk_suffix = ConstString(".kdk");
 
   PlatformDarwinKernel *thisp = (PlatformDarwinKernel *)baton;
-  FileSpec file_spec(path, false);
+  FileSpec file_spec(path);
   if (ft == llvm::sys::fs::file_type::directory_file &&
       (file_spec.GetFileNameExtension() == g_sdk_suffix ||
        file_spec.GetFileNameExtension() == g_kdk_suffix)) {
@@ -499,7 +502,7 @@ PlatformDarwinKernel::GetKernelsAndKexts
   static ConstString g_dsym_suffix = ConstString(".dSYM");
   static ConstString g_bundle_suffix = ConstString("Bundle");
 
-  FileSpec file_spec(path, false);
+  FileSpec file_spec(path);
   ConstString file_spec_extension = file_spec.GetFileNameExtension();
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
@@ -537,12 +540,12 @@ PlatformDarwinKernel::GetKernelsAndKexts
              file_spec_extension == g_kext_suffix) {
     AddKextToMap(thisp, file_spec);
     // Look to see if there is a PlugIns subdir with more kexts
-    FileSpec contents_plugins(file_spec.GetPath() + "/Contents/PlugIns", false);
+    FileSpec contents_plugins(file_spec.GetPath() + "/Contents/PlugIns");
     std::string search_here_too;
     if (llvm::sys::fs::is_directory(contents_plugins.GetPath())) {
       search_here_too = contents_plugins.GetPath();
     } else {
-      FileSpec plugins(file_spec.GetPath() + "/PlugIns", false);
+      FileSpec plugins(file_spec.GetPath() + "/PlugIns");
       if (llvm::sys::fs::is_directory(plugins.GetPath())) {
         search_here_too = plugins.GetPath();
       }
@@ -628,7 +631,8 @@ bool PlatformDarwinKernel::KextHasdSYMSi
       kext_bundle_filepath.GetPath() + "/Contents/MacOS/";
   deep_bundle_str += executable_name.AsCString();
   deep_bundle_str += ".dSYM";
-  dsym_fspec.SetFile(deep_bundle_str, true, FileSpec::Style::native);
+  dsym_fspec.SetFile(deep_bundle_str, FileSpec::Style::native);
+  FileSystem::Instance().Resolve(dsym_fspec);
   if (llvm::sys::fs::is_directory(dsym_fspec.GetPath())) {
     return true;
   }
@@ -638,7 +642,8 @@ bool PlatformDarwinKernel::KextHasdSYMSi
   std::string shallow_bundle_str = kext_bundle_filepath.GetPath() + "/";
   shallow_bundle_str += executable_name.AsCString();
   shallow_bundle_str += ".dSYM";
-  dsym_fspec.SetFile(shallow_bundle_str, true, FileSpec::Style::native);
+  dsym_fspec.SetFile(shallow_bundle_str, FileSpec::Style::native);
+  FileSystem::Instance().Resolve(dsym_fspec);
   if (llvm::sys::fs::is_directory(dsym_fspec.GetPath())) {
     return true;
   }
@@ -796,7 +801,7 @@ PlatformDarwinKernel::SearchForExecutabl
       break;
     if (llvm::sys::fs::is_regular_file(*status) &&
         llvm::sys::fs::can_execute(it->path()))
-      executables.emplace_back(it->path(), false);
+      executables.emplace_back(it->path());
   }
   return executables;
 }

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Thu Nov  1 14:05:36 2018
@@ -218,13 +218,13 @@ ConstString PlatformMacOSX::GetSDKDirect
                           "SDKs/MacOSX%u.%u.sdk",
                           xcode_contents_path.c_str(), versions[0],
                           versions[1]);
-          fspec.SetFile(sdk_path.GetString(), false, FileSpec::Style::native);
+          fspec.SetFile(sdk_path.GetString(), FileSpec::Style::native);
           if (FileSystem::Instance().Exists(fspec))
             return ConstString(sdk_path.GetString());
         }
 
         if (!default_xcode_sdk.empty()) {
-          fspec.SetFile(default_xcode_sdk, false, FileSpec::Style::native);
+          fspec.SetFile(default_xcode_sdk, FileSpec::Style::native);
           if (FileSystem::Instance().Exists(fspec))
             return ConstString(default_xcode_sdk);
         }
@@ -268,7 +268,7 @@ PlatformMacOSX::GetFileWithUUID(const ll
       std::string cache_path(GetLocalCacheDirectory());
       std::string module_path(platform_file.GetPath());
       cache_path.append(module_path);
-      FileSpec module_cache_spec(cache_path, false);
+      FileSpec module_cache_spec(cache_path);
       if (FileSystem::Instance().Exists(module_cache_spec)) {
         local_file = module_cache_spec;
         return Status();

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp Thu Nov  1 14:05:36 2018
@@ -144,8 +144,7 @@ FileSystem::EnumerateDirectoryResult
 PlatformRemoteDarwinDevice::GetContainedFilesIntoVectorOfStringsCallback(
     void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path) {
   ((PlatformRemoteDarwinDevice::SDKDirectoryInfoCollection *)baton)
-      ->push_back(
-          PlatformRemoteDarwinDevice::SDKDirectoryInfo(FileSpec(path, false)));
+      ->push_back(PlatformRemoteDarwinDevice::SDKDirectoryInfo(FileSpec(path)));
   return FileSystem::eEnumerateDirectoryResultNext;
 }
 
@@ -155,7 +154,8 @@ bool PlatformRemoteDarwinDevice::UpdateS
   if (m_sdk_directory_infos.empty()) {
     // A --sysroot option was supplied - add it to our list of SDKs to check
     if (m_sdk_sysroot) {
-      FileSpec sdk_sysroot_fspec(m_sdk_sysroot.GetCString(), true);
+      FileSpec sdk_sysroot_fspec(m_sdk_sysroot.GetCString());
+      FileSystem::Instance().Resolve(sdk_sysroot_fspec);
       const SDKDirectoryInfo sdk_sysroot_directory_info(sdk_sysroot_fspec);
       m_sdk_directory_infos.push_back(sdk_sysroot_directory_info);
       if (log) {
@@ -207,7 +207,8 @@ bool PlatformRemoteDarwinDevice::UpdateS
         const uint32_t num_installed = m_sdk_directory_infos.size();
         std::string local_sdk_cache_str = "~/Library/Developer/Xcode/";
         local_sdk_cache_str += dirname;
-        FileSpec local_sdk_cache(local_sdk_cache_str.c_str(), true);
+        FileSpec local_sdk_cache(local_sdk_cache_str.c_str());
+        FileSystem::Instance().Resolve(local_sdk_cache);
         if (FileSystem::Instance().Exists(local_sdk_cache)) {
           if (log) {
             log->Printf("PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded "
@@ -420,11 +421,11 @@ bool PlatformRemoteDarwinDevice::GetFile
 
       const char *paths_to_try[] = {"Symbols", "", "Symbols.Internal", nullptr};
       for (size_t i = 0; paths_to_try[i] != nullptr; i++) {
-        local_file.SetFile(sdkroot_path, false, FileSpec::Style::native);
+        local_file.SetFile(sdkroot_path, FileSpec::Style::native);
         if (paths_to_try[i][0] != '\0')
           local_file.AppendPathComponent(paths_to_try[i]);
         local_file.AppendPathComponent(platform_file_path);
-        local_file.ResolvePath();
+        FileSystem::Instance().Resolve(local_file);
         if (FileSystem::Instance().Exists(local_file)) {
           if (log)
             log->Printf("Found a copy of %s in the SDK dir %s/%s",
@@ -453,7 +454,8 @@ Status PlatformRemoteDarwinDevice::GetSy
       ::snprintf(resolved_path, sizeof(resolved_path), "%s/%s", os_version_dir,
                  platform_file_path);
 
-      local_file.SetFile(resolved_path, true, FileSpec::Style::native);
+      local_file.SetFile(resolved_path, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file)) {
         if (log) {
           log->Printf("Found a copy of %s in the DeviceSupport dir %s",
@@ -465,7 +467,8 @@ Status PlatformRemoteDarwinDevice::GetSy
       ::snprintf(resolved_path, sizeof(resolved_path), "%s/Symbols.Internal/%s",
                  os_version_dir, platform_file_path);
 
-      local_file.SetFile(resolved_path, true, FileSpec::Style::native);
+      local_file.SetFile(resolved_path, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file)) {
         if (log) {
           log->Printf(
@@ -477,7 +480,8 @@ Status PlatformRemoteDarwinDevice::GetSy
       ::snprintf(resolved_path, sizeof(resolved_path), "%s/Symbols/%s",
                  os_version_dir, platform_file_path);
 
-      local_file.SetFile(resolved_path, true, FileSpec::Style::native);
+      local_file.SetFile(resolved_path, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file)) {
         if (log) {
           log->Printf("Found a copy of %s in the DeviceSupport dir %s/Symbols",

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp Thu Nov  1 14:05:36 2018
@@ -257,7 +257,7 @@ static FileSystem::EnumerateDirectoryRes
 EnumerateDirectoryCallback(void *baton, llvm::sys::fs::file_type ft,
                            llvm::StringRef path) {
   if (ft == llvm::sys::fs::file_type::directory_file) {
-    FileSpec file_spec(path, false);
+    FileSpec file_spec(path);
     const char *filename = file_spec.GetFilename().GetCString();
     if (filename &&
         strncmp(filename, "iPhoneSimulator", strlen("iPhoneSimulator")) == 0) {
@@ -321,12 +321,14 @@ Status PlatformiOSSimulator::GetSymbolFi
                  platform_file_path);
 
       // First try in the SDK and see if the file is in there
-      local_file.SetFile(resolved_path, true, FileSpec::Style::native);
+      local_file.SetFile(resolved_path, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file))
         return error;
 
       // Else fall back to the actual path itself
-      local_file.SetFile(platform_file_path, true, FileSpec::Style::native);
+      local_file.SetFile(platform_file_path, FileSpec::Style::native);
+      FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file))
         return error;
     }

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm Thu Nov  1 14:05:36 2018
@@ -409,7 +409,7 @@ static Status HandleFileAction(ProcessLa
           // Check in case our file action open wants to open the slave
           const char *slave_path = launch_info.GetPTY().GetSlaveName(NULL, 0);
           if (slave_path) {
-            FileSpec slave_spec(slave_path, false);
+            FileSpec slave_spec(slave_path);
             if (file_spec == slave_spec) {
               int slave_fd = launch_info.GetPTY().GetSlaveFileDescriptor();
               if (slave_fd == PseudoTerminal::invalid_fd)

Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp Thu Nov  1 14:05:36 2018
@@ -130,8 +130,9 @@ PlatformPOSIX::ResolveExecutable(const M
     // on the current path variables
     if (!FileSystem::Instance().Exists(resolved_module_spec.GetFileSpec())) {
       resolved_module_spec.GetFileSpec().GetPath(exe_path, sizeof(exe_path));
-      resolved_module_spec.GetFileSpec().SetFile(exe_path, true,
+      resolved_module_spec.GetFileSpec().SetFile(exe_path,
                                                  FileSpec::Style::native);
+      FileSystem::Instance().Resolve(resolved_module_spec.GetFileSpec());
     }
 
     if (!FileSystem::Instance().Exists(resolved_module_spec.GetFileSpec()))
@@ -1284,8 +1285,7 @@ uint32_t PlatformPOSIX::DoLoadImage(lldb
       std::string name_string;
       process->ReadCStringFromMemory(buffer_addr, name_string, utility_error);
       if (utility_error.Success())
-        loaded_image->SetFile(name_string, false, 
-                              llvm::sys::path::Style::posix);
+        loaded_image->SetFile(name_string, llvm::sys::path::Style::posix);
     }
     return process->AddImageToken(token);
   }

Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp Thu Nov  1 14:05:36 2018
@@ -194,8 +194,9 @@ Status PlatformWindows::ResolveExecutabl
     // variables
     if (!FileSystem::Instance().Exists(resolved_module_spec.GetFileSpec())) {
       resolved_module_spec.GetFileSpec().GetPath(exe_path, sizeof(exe_path));
-      resolved_module_spec.GetFileSpec().SetFile(exe_path, true,
+      resolved_module_spec.GetFileSpec().SetFile(exe_path,
                                                  FileSpec::Style::native);
+      FileSystem::Instance().Resolve(resolved_module_spec.GetFileSpec());
     }
 
     if (!FileSystem::Instance().Exists(resolved_module_spec.GetFileSpec()))

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp Thu Nov  1 14:05:36 2018
@@ -391,8 +391,7 @@ Status ProcessFreeBSD::DoLaunch(Module *
   FileSpec stdout_file_spec{};
   FileSpec stderr_file_spec{};
 
-  const FileSpec dbg_pts_file_spec{launch_info.GetPTY().GetSlaveName(NULL, 0),
-                                   false};
+  const FileSpec dbg_pts_file_spec{launch_info.GetPTY().GetSlaveName(NULL, 0)};
 
   file_action = launch_info.GetFileActionForFD(STDIN_FILENO);
   stdin_file_spec =

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Thu Nov  1 14:05:36 2018
@@ -1418,8 +1418,9 @@ Status NativeProcessLinux::PopulateMemor
       m_supports_mem_region = LazyBool::eLazyBoolNo;
       return parse_error;
     }
-    m_mem_region_cache.emplace_back(
-        info, FileSpec(info.GetName().GetCString(), true));
+    FileSpec file_spec(info.GetName().GetCString());
+    FileSystem::Instance().Resolve(file_spec);
+    m_mem_region_cache.emplace_back(info, file_spec);
   }
 
   if (m_mem_region_cache.empty()) {
@@ -1723,7 +1724,8 @@ Status NativeProcessLinux::GetLoadedModu
   if (error.Fail())
     return error;
 
-  FileSpec module_file_spec(module_path, true);
+  FileSpec module_file_spec(module_path);
+  FileSystem::Instance().Resolve(module_file_spec);
 
   file_spec.Clear();
   for (const auto &it : m_mem_region_cache) {
@@ -1743,7 +1745,7 @@ Status NativeProcessLinux::GetFileLoadAd
   if (error.Fail())
     return error;
 
-  FileSpec file(file_name, false);
+  FileSpec file(file_name);
   for (const auto &it : m_mem_region_cache) {
     if (it.second == file) {
       load_addr = it.first.GetRange().GetRangeBase();

Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Thu Nov  1 14:05:36 2018
@@ -249,8 +249,7 @@ Status ProcessElfCore::DoLoadCore() {
       ModuleSpec exe_module_spec;
       exe_module_spec.GetArchitecture() = arch;
       exe_module_spec.GetFileSpec().SetFile(
-          m_nt_file_entries[0].path.GetCString(), false,
-          FileSpec::Style::native);
+          m_nt_file_entries[0].path.GetCString(), FileSpec::Style::native);
       if (exe_module_spec.GetFileSpec()) {
         exe_module_sp = GetTarget().GetSharedModule(exe_module_spec);
         if (exe_module_sp)

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Thu Nov  1 14:05:36 2018
@@ -998,7 +998,7 @@ Status GDBRemoteCommunication::StartDebu
   // debugserver to use and use it if we do.
   const char *env_debugserver_path = getenv("LLDB_DEBUGSERVER_PATH");
   if (env_debugserver_path) {
-    debugserver_file_spec.SetFile(env_debugserver_path, false,
+    debugserver_file_spec.SetFile(env_debugserver_path,
                                   FileSpec::Style::native);
     if (log)
       log->Printf("GDBRemoteCommunication::%s() gdb-remote stub exe path set "

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Nov  1 14:05:36 2018
@@ -1818,7 +1818,7 @@ bool GDBRemoteCommunicationClient::GetWo
       return false;
     std::string cwd;
     response.GetHexByteString(cwd);
-    working_dir.SetFile(cwd, false, GetHostArchitecture().GetTriple());
+    working_dir.SetFile(cwd, GetHostArchitecture().GetTriple());
     return !cwd.empty();
   }
   return false;
@@ -1928,8 +1928,7 @@ bool GDBRemoteCommunicationClient::Decod
         // characters in a process name
         std::string name;
         extractor.GetHexByteString(name);
-        process_info.GetExecutableFile().SetFile(name, false,
-                                                 FileSpec::Style::native);
+        process_info.GetExecutableFile().SetFile(name, FileSpec::Style::native);
       } else if (name.equals("cputype")) {
         value.getAsInteger(0, cpu);
       } else if (name.equals("cpusubtype")) {
@@ -3562,7 +3561,7 @@ bool GDBRemoteCommunicationClient::GetMo
       StringExtractor extractor(value);
       std::string path;
       extractor.GetHexByteString(path);
-      module_spec.GetFileSpec() = FileSpec(path, false, arch_spec.GetTriple());
+      module_spec.GetFileSpec() = FileSpec(path, arch_spec.GetTriple());
     }
   }
 
@@ -3598,8 +3597,7 @@ ParseModuleSpec(StructuredData::Dictiona
 
   if (!dict->GetValueForKeyAsString("file_path", string))
     return llvm::None;
-  result.GetFileSpec() =
-      FileSpec(string, false, result.GetArchitecture().GetTriple());
+  result.GetFileSpec() = FileSpec(string, result.GetArchitecture().GetTriple());
 
   return result;
 }

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Thu Nov  1 14:05:36 2018
@@ -353,7 +353,7 @@ GDBRemoteCommunicationServerCommon::Hand
         std::string file;
         extractor.GetHexByteString(file);
         match_info.GetProcessInfo().GetExecutableFile().SetFile(
-            file, false, FileSpec::Style::native);
+            file, FileSpec::Style::native);
       } else if (key.equals("name_match")) {
         NameMatch name_match = llvm::StringSwitch<NameMatch>(value)
                                    .Case("equals", NameMatch::Equals)
@@ -520,7 +520,8 @@ GDBRemoteCommunicationServerCommon::Hand
       if (packet.GetChar() == ',') {
         mode_t mode = packet.GetHexMaxU32(false, 0600);
         Status error;
-        const FileSpec path_spec{path, true};
+        FileSpec path_spec(path);
+        FileSystem::Instance().Resolve(path_spec);
         int fd = ::open(path_spec.GetCString(), flags, mode);
         const int save_errno = fd == -1 ? errno : 0;
         StreamString response;
@@ -660,7 +661,9 @@ GDBRemoteCommunicationServerCommon::Hand
   packet.GetHexByteString(path);
   if (!path.empty()) {
     Status error;
-    const uint32_t mode = File::GetPermissions(FileSpec{path, true}, error);
+    FileSpec file_spec(path);
+    FileSystem::Instance().Resolve(file_spec);
+    const uint32_t mode = File::GetPermissions(file_spec, error);
     StreamString response;
     response.Printf("F%u", mode);
     if (mode == 0 || error.Fail())
@@ -698,7 +701,11 @@ GDBRemoteCommunicationServerCommon::Hand
   packet.GetHexByteStringTerminatedBy(dst, ',');
   packet.GetChar(); // Skip ',' char
   packet.GetHexByteString(src);
-  Status error = FileSystem::Instance().Symlink(FileSpec{src, true}, FileSpec{dst, false});
+
+  FileSpec src_spec(src);
+  FileSystem::Instance().Resolve(src_spec);
+  Status error = FileSystem::Instance().Symlink(src_spec, FileSpec(dst));
+
   StreamString response;
   response.Printf("F%u,%u", error.GetError(), error.GetError());
   return SendPacketNoLock(response.GetString());
@@ -731,9 +738,11 @@ GDBRemoteCommunicationServerCommon::Hand
         packet.GetHexByteString(working_dir);
       int status, signo;
       std::string output;
-      Status err = Host::RunShellCommand(
-          path.c_str(), FileSpec{working_dir, true}, &status, &signo, &output,
-          std::chrono::seconds(10));
+      FileSpec working_spec(working_dir);
+      FileSystem::Instance().Resolve(working_spec);
+      Status err =
+          Host::RunShellCommand(path.c_str(), working_spec, &status, &signo,
+                                &output, std::chrono::seconds(10));
       StreamGDBRemote response;
       if (err.Fail()) {
         response.PutCString("F,");
@@ -884,7 +893,7 @@ GDBRemoteCommunicationServerCommon::Hand
   packet.GetHexByteString(path);
   const bool read = true;
   const bool write = false;
-  if (file_action.Open(STDIN_FILENO, FileSpec{path, false}, read, write)) {
+  if (file_action.Open(STDIN_FILENO, FileSpec(path), read, write)) {
     m_process_launch_info.AppendFileAction(file_action);
     return SendOKResponse();
   }
@@ -900,7 +909,7 @@ GDBRemoteCommunicationServerCommon::Hand
   packet.GetHexByteString(path);
   const bool read = false;
   const bool write = true;
-  if (file_action.Open(STDOUT_FILENO, FileSpec{path, false}, read, write)) {
+  if (file_action.Open(STDOUT_FILENO, FileSpec(path), read, write)) {
     m_process_launch_info.AppendFileAction(file_action);
     return SendOKResponse();
   }
@@ -916,7 +925,7 @@ GDBRemoteCommunicationServerCommon::Hand
   packet.GetHexByteString(path);
   const bool read = false;
   const bool write = true;
-  if (file_action.Open(STDERR_FILENO, FileSpec{path, false}, read, write)) {
+  if (file_action.Open(STDERR_FILENO, FileSpec(path), read, write)) {
     m_process_launch_info.AppendFileAction(file_action);
     return SendOKResponse();
   }
@@ -1024,7 +1033,7 @@ GDBRemoteCommunicationServerCommon::Hand
               if (success) {
                 if (arg_idx == 0)
                   m_process_launch_info.GetExecutableFile().SetFile(
-                      arg, false, FileSpec::Style::native);
+                      arg, FileSpec::Style::native);
                 m_process_launch_info.GetArguments().AppendArgument(arg);
                 if (log)
                   log->Printf("LLGSPacketHandler::%s added arg %d: \"%s\"",
@@ -1263,7 +1272,9 @@ FileSpec GDBRemoteCommunicationServerCom
 #ifdef __ANDROID__
   return HostInfoAndroid::ResolveLibraryPath(module_path, arch);
 #else
-  return FileSpec(module_path, true);
+  FileSpec file_spec(module_path);
+  FileSystem::Instance().Resolve(file_spec);
+  return file_spec;
 #endif
 }
 
@@ -1272,7 +1283,9 @@ GDBRemoteCommunicationServerCommon::GetM
                                                   llvm::StringRef triple) {
   ArchSpec arch(triple);
 
-  const FileSpec req_module_path_spec(module_path, true);
+  FileSpec req_module_path_spec(module_path);
+  FileSystem::Instance().Resolve(req_module_path_spec);
+
   const FileSpec module_path_spec =
       FindModuleFile(req_module_path_spec.GetPath(), arch);
   const ModuleSpec module_spec(module_path_spec, arch);

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp Thu Nov  1 14:05:36 2018
@@ -1333,7 +1333,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   packet.SetFilePos(::strlen("QSetWorkingDir:"));
   std::string path;
   packet.GetHexByteString(path);
-  m_process_launch_info.SetWorkingDirectory(FileSpec{path, true});
+  m_process_launch_info.SetWorkingDirectory(FileSpec(path));
   return SendOKResponse();
 }
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp Thu Nov  1 14:05:36 2018
@@ -532,7 +532,7 @@ const FileSpec &GDBRemoteCommunicationSe
     const char *domainsocket_dir_env =
         ::getenv("LLDB_DEBUGSERVER_DOMAINSOCKET_DIR");
     if (domainsocket_dir_env != nullptr)
-      g_domainsocket_dir = FileSpec(domainsocket_dir_env, false);
+      g_domainsocket_dir = FileSpec(domainsocket_dir_env);
     else
       g_domainsocket_dir = HostInfo::GetProcessTempDir();
   });
@@ -550,7 +550,7 @@ GDBRemoteCommunicationServerPlatform::Ge
   socket_path_spec.AppendPathComponent(socket_name.c_str());
 
   llvm::sys::fs::createUniqueFile(socket_path_spec.GetCString(), socket_path);
-  return FileSpec(socket_path.c_str(), false);
+  return FileSpec(socket_path.c_str());
 }
 
 void GDBRemoteCommunicationServerPlatform::SetPortOffset(uint16_t port_offset) {

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Nov  1 14:05:36 2018
@@ -442,7 +442,7 @@ void ProcessGDBRemote::BuildDynamicRegis
   if (!FileSystem::Instance().Exists(target_definition_fspec)) {
     // If the filename doesn't exist, it may be a ~ not having been expanded -
     // try to resolve it.
-    target_definition_fspec.ResolvePath();
+    FileSystem::Instance().Resolve(target_definition_fspec);
   }
   if (target_definition_fspec) {
     // See if we can get register definitions from a python file
@@ -825,13 +825,13 @@ Status ProcessGDBRemote::DoLaunch(Module
       if (disable_stdio) {
         // set to /dev/null unless redirected to a file above
         if (!stdin_file_spec)
-          stdin_file_spec.SetFile(FileSystem::DEV_NULL, false,
+          stdin_file_spec.SetFile(FileSystem::DEV_NULL,
                                   FileSpec::Style::native);
         if (!stdout_file_spec)
-          stdout_file_spec.SetFile(FileSystem::DEV_NULL, false,
+          stdout_file_spec.SetFile(FileSystem::DEV_NULL,
                                    FileSpec::Style::native);
         if (!stderr_file_spec)
-          stderr_file_spec.SetFile(FileSystem::DEV_NULL, false,
+          stderr_file_spec.SetFile(FileSystem::DEV_NULL,
                                    FileSpec::Style::native);
       } else if (platform_sp && platform_sp->IsHost()) {
         // If the debugserver is local and we aren't disabling STDIO, lets use
@@ -840,7 +840,7 @@ Status ProcessGDBRemote::DoLaunch(Module
         // does a lot of output.
         if ((!stdin_file_spec || !stdout_file_spec || !stderr_file_spec) &&
             pty.OpenFirstAvailableMaster(O_RDWR | O_NOCTTY, NULL, 0)) {
-          FileSpec slave_name{pty.GetSlaveName(NULL, 0), false};
+          FileSpec slave_name{pty.GetSlaveName(NULL, 0)};
 
           if (!stdin_file_spec)
             stdin_file_spec = slave_name;
@@ -4768,7 +4768,8 @@ size_t ProcessGDBRemote::LoadModules(Loa
     if (!modInfo.get_link_map(link_map))
       link_map = LLDB_INVALID_ADDRESS;
 
-    FileSpec file(mod_name, true);
+    FileSpec file(mod_name);
+    FileSystem::Instance().Resolve(file);
     lldb::ModuleSP module_sp =
         LoadModuleAtAddress(file, link_map, mod_base, mod_base_is_offset);
 

Modified: lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp Thu Nov  1 14:05:36 2018
@@ -346,8 +346,8 @@ void ProcessMinidump::ReadModuleList() {
     }
 
     const auto uuid = m_minidump_parser.GetModuleUUID(module);
-    const auto file_spec =
-        FileSpec(name.getValue(), true, GetArchitecture().GetTriple());
+    auto file_spec = FileSpec(name.getValue(), GetArchitecture().GetTriple());
+    FileSystem::Instance().Resolve(file_spec);
     ModuleSpec module_spec(file_spec, uuid);
     Status error;
     lldb::ModuleSP module_sp = GetTarget().GetSharedModule(module_spec, &error);

Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Thu Nov  1 14:05:36 2018
@@ -2749,7 +2749,8 @@ bool ScriptInterpreterPython::LoadScript
   lldb::DebuggerSP debugger_sp = m_interpreter.GetDebugger().shared_from_this();
 
   {
-    FileSpec target_file(pathname, true);
+    FileSpec target_file(pathname);
+    FileSystem::Instance().Resolve(target_file);
     std::string basename(target_file.GetFilename().GetCString());
 
     StreamString command_stream;

Modified: lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp (original)
+++ lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp Thu Nov  1 14:05:36 2018
@@ -1677,7 +1677,7 @@ void StructuredDataDarwinLog::AddInitCom
   // Build up the module list.
   FileSpecList module_spec_list;
   auto module_file_spec =
-      FileSpec(GetGlobalProperties()->GetLoggingModuleName(), false);
+      FileSpec(GetGlobalProperties()->GetLoggingModuleName());
   module_spec_list.Append(module_file_spec);
 
   // We aren't specifying a source file set.

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp Thu Nov  1 14:05:36 2018
@@ -547,7 +547,7 @@ bool DWARFDebugLine::ParseSupportFiles(
   for (uint32_t file_idx = 1;
        prologue.GetFile(file_idx, cu_comp_dir, file_spec); ++file_idx) {
     if (module_sp->RemapSourceFile(file_spec.GetPath(), remapped_file))
-      file_spec.SetFile(remapped_file, false, FileSpec::Style::native);
+      file_spec.SetFile(remapped_file, FileSpec::Style::native);
     support_files.Append(file_spec);
   }
   return true;
@@ -950,7 +950,7 @@ bool DWARFDebugLine::Prologue::GetFile(u
     const lldb_private::FileSpec &comp_dir, FileSpec &file) const {
   uint32_t idx = file_idx - 1; // File indexes are 1 based...
   if (idx < file_names.size()) {
-    file.SetFile(file_names[idx].name, false, FileSpec::Style::native);
+    file.SetFile(file_names[idx].name, FileSpec::Style::native);
     if (file.IsRelative()) {
       if (file_names[idx].dir_idx > 0) {
         const uint32_t dir_idx = file_names[idx].dir_idx - 1;

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Nov  1 14:05:36 2018
@@ -197,7 +197,7 @@ static FileSpec resolveCompDir(const cha
   bool is_symlink = false;
   // Always normalize our compile unit directory to get rid of redundant
   // slashes and other path anomalies before we use it for path prepending
-  FileSpec local_spec(local_path, false);
+  FileSpec local_spec(local_path);
   const auto &file_specs = GetGlobalPluginProperties()->GetSymLinkPaths();
   for (size_t i = 0; i < file_specs.GetSize() && !is_symlink; ++i)
     is_symlink = FileSpec::Equal(file_specs.GetFileSpecAtIndex(i),
@@ -811,7 +811,7 @@ lldb::CompUnitSP SymbolFileDWARF::ParseC
         if (module_sp) {
           const DWARFDIE cu_die = dwarf_cu->DIE();
           if (cu_die) {
-            FileSpec cu_file_spec{cu_die.GetName(), false};
+            FileSpec cu_file_spec(cu_die.GetName());
             if (cu_file_spec) {
               // If we have a full path to the compile unit, we don't need to
               // resolve the file.  This can be expensive e.g. when the source
@@ -826,8 +826,7 @@ lldb::CompUnitSP SymbolFileDWARF::ParseC
               std::string remapped_file;
               if (module_sp->RemapSourceFile(cu_file_spec.GetPath(),
                                              remapped_file))
-                cu_file_spec.SetFile(remapped_file, false,
-                                     FileSpec::Style::native);
+                cu_file_spec.SetFile(remapped_file, FileSpec::Style::native);
             }
 
             LanguageType cu_language = DWARFUnit::LanguageTypeFromDWARF(
@@ -1629,14 +1628,16 @@ SymbolFileDWARF::GetDwoSymbolFileForComp
       return dwo_symfile;
   }
 
-  FileSpec dwo_file(dwo_name, true);
+  FileSpec dwo_file(dwo_name);
+  FileSystem::Instance().Resolve(dwo_file);
   if (dwo_file.IsRelative()) {
     const char *comp_dir = cu_die.GetAttributeValueAsString(
         this, &dwarf_cu, DW_AT_comp_dir, nullptr);
     if (!comp_dir)
       return nullptr;
 
-    dwo_file.SetFile(comp_dir, true, FileSpec::Style::native);
+    dwo_file.SetFile(comp_dir, FileSpec::Style::native);
+    FileSystem::Instance().Resolve(dwo_file);
     dwo_file.AppendPathComponent(dwo_name);
   }
 
@@ -1680,14 +1681,15 @@ void SymbolFileDWARF::UpdateExternalModu
               die.GetAttributeValueAsString(DW_AT_GNU_dwo_name, nullptr);
           if (dwo_path) {
             ModuleSpec dwo_module_spec;
-            dwo_module_spec.GetFileSpec().SetFile(dwo_path, false,
+            dwo_module_spec.GetFileSpec().SetFile(dwo_path,
                                                   FileSpec::Style::native);
             if (dwo_module_spec.GetFileSpec().IsRelative()) {
               const char *comp_dir =
                   die.GetAttributeValueAsString(DW_AT_comp_dir, nullptr);
               if (comp_dir) {
-                dwo_module_spec.GetFileSpec().SetFile(comp_dir, true,
+                dwo_module_spec.GetFileSpec().SetFile(comp_dir,
                                                       FileSpec::Style::native);
+                FileSystem::Instance().Resolve(dwo_module_spec.GetFileSpec());
                 dwo_module_spec.GetFileSpec().AppendPathComponent(dwo_path);
               }
             }
@@ -3877,7 +3879,7 @@ SymbolFileDWARFDwp *SymbolFileDWARF::Get
     ModuleSpec module_spec;
     module_spec.GetFileSpec() = m_obj_file->GetFileSpec();
     module_spec.GetSymbolFileSpec() =
-        FileSpec(m_obj_file->GetFileSpec().GetPath() + ".dwp", false);
+        FileSpec(m_obj_file->GetFileSpec().GetPath() + ".dwp");
     FileSpec dwp_filespec = Symbols::LocateExecutableSymbolFile(module_spec);
     if (FileSystem::Instance().Exists(dwp_filespec)) {
       m_dwp_symfile = SymbolFileDWARFDwp::Create(GetObjectFile()->GetModule(),

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Thu Nov  1 14:05:36 2018
@@ -351,7 +351,7 @@ void SymbolFileDWARFDebugMap::InitOSO()
             so_symbol->GetType() == eSymbolTypeSourceFile &&
             oso_symbol->GetType() == eSymbolTypeObjectFile) {
           m_compile_unit_infos[i].so_file.SetFile(
-              so_symbol->GetName().AsCString(), false, FileSpec::Style::native);
+              so_symbol->GetName().AsCString(), FileSpec::Style::native);
           m_compile_unit_infos[i].oso_path = oso_symbol->GetName();
           m_compile_unit_infos[i].oso_mod_time =
               llvm::sys::toTimePoint(oso_symbol->GetIntegerValue(0));
@@ -421,7 +421,7 @@ Module *SymbolFileDWARFDebugMap::GetModu
       m_oso_map[{comp_unit_info->oso_path, comp_unit_info->oso_mod_time}] =
           comp_unit_info->oso_sp;
       const char *oso_path = comp_unit_info->oso_path.GetCString();
-      FileSpec oso_file(oso_path, false);
+      FileSpec oso_file(oso_path);
       ConstString oso_object;
       if (FileSystem::Instance().Exists(oso_file)) {
         auto oso_mod_time = FileSystem::Instance().GetModificationTime(oso_file);

Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Thu Nov  1 14:05:36 2018
@@ -594,7 +594,7 @@ SymbolFileNativePDB::CreateCompileUnit(c
 
   llvm::StringRef source_file_name =
       m_index->compilands().GetMainSourceFile(cci);
-  FileSpec fs(source_file_name, false);
+  FileSpec fs(source_file_name);
 
   CompUnitSP cu_sp =
       std::make_shared<CompileUnit>(m_obj_file->GetModule(), nullptr, fs,
@@ -1373,7 +1373,7 @@ bool SymbolFileNativePDB::ParseCompileUn
   for (llvm::StringRef f : cci->m_file_list) {
     FileSpec::Style style =
         f.startswith("/") ? FileSpec::Style::posix : FileSpec::Style::windows;
-    FileSpec spec(f, false, style);
+    FileSpec spec(f, style);
     support_files.Append(spec);
   }
 

Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp Thu Nov  1 14:05:36 2018
@@ -200,7 +200,7 @@ static bool GetDeclarationForSymbol(cons
   if (!src_file_up)
     return false;
 
-  FileSpec spec(src_file_up->getFileName(), /*resolve_path*/ false);
+  FileSpec spec(src_file_up->getFileName());
   decl.SetFile(spec);
   decl.SetColumn(first_line_up->getColumnNumber());
   decl.SetLine(first_line_up->getLineNumber());

Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Thu Nov  1 14:05:36 2018
@@ -363,7 +363,7 @@ bool SymbolFilePDB::ParseCompileUnitSupp
     return false;
 
   while (auto file = files->getNext()) {
-    FileSpec spec(file->getFileName(), false, FileSpec::Style::windows);
+    FileSpec spec(file->getFileName(), FileSpec::Style::windows);
     support_files.AppendIfUnique(spec);
   }
 
@@ -768,7 +768,7 @@ uint32_t SymbolFilePDB::ResolveSymbolCon
         std::string source_file = compiland->getSourceFileFullPath();
         if (source_file.empty())
           continue;
-        FileSpec this_spec(source_file, false, FileSpec::Style::windows);
+        FileSpec this_spec(source_file, FileSpec::Style::windows);
         bool need_full_match = !file_spec.GetDirectory().IsEmpty();
         if (FileSpec::Compare(file_spec, this_spec, need_full_match) != 0)
           continue;
@@ -929,7 +929,7 @@ VariableSP SymbolFilePDB::ParseVariableF
         uint32_t src_file_id = first_line->getSourceFileId();
         auto src_file = m_session_up->getSourceFileById(src_file_id);
         if (src_file) {
-          FileSpec spec(src_file->getFileName(), /*resolve_path*/ false);
+          FileSpec spec(src_file->getFileName());
           decl.SetFile(spec);
           decl.SetColumn(first_line->getColumnNumber());
           decl.SetLine(first_line->getLineNumber());

Modified: lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp Thu Nov  1 14:05:36 2018
@@ -101,7 +101,7 @@ SymbolVendorELF::CreateInstance(const ll
     const FileSpec fspec = file_spec_list.GetFileSpecAtIndex(idx);
 
     module_spec.GetFileSpec() = obj_file->GetFileSpec();
-    module_spec.GetFileSpec().ResolvePath();
+    FileSystem::Instance().Resolve(module_spec.GetFileSpec());
     module_spec.GetSymbolFileSpec() = fspec;
     module_spec.GetUUID() = uuid;
     FileSpec dsym_fspec = Symbols::LocateExecutableSymbolFile(module_spec);

Modified: lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp Thu Nov  1 14:05:36 2018
@@ -173,7 +173,7 @@ SymbolVendorMacOSX::CreateInstance(const
                   resources[strlen("/Contents/Resources/")] = '\0';
                   snprintf(dsym_uuid_plist_path, sizeof(dsym_uuid_plist_path),
                            "%s%s.plist", dsym_path, uuid_str.c_str());
-                  FileSpec dsym_uuid_plist_spec(dsym_uuid_plist_path, false);
+                  FileSpec dsym_uuid_plist_spec(dsym_uuid_plist_path);
                   if (FileSystem::Instance().Exists(dsym_uuid_plist_spec)) {
                     ApplePropertyList plist(dsym_uuid_plist_path);
                     if (plist) {
@@ -244,7 +244,9 @@ SymbolVendorMacOSX::CreateInstance(const
                                 }
                                 if (DBGSourcePath[0] == '~') {
                                   FileSpec resolved_source_path(
-                                      DBGSourcePath.c_str(), true);
+                                      DBGSourcePath.c_str());
+                                  FileSystem::Instance().Resolve(
+                                      resolved_source_path);
                                   DBGSourcePath =
                                       resolved_source_path.GetPath();
                                 }
@@ -257,8 +259,8 @@ SymbolVendorMacOSX::CreateInstance(const
                                 // Add this as another option in addition to
                                 // the full source path remap.
                                 if (do_truncate_remapping_names) {
-                                  FileSpec build_path(key.AsCString(), false);
-                                  FileSpec source_path(DBGSourcePath.c_str(), false);
+                                  FileSpec build_path(key.AsCString());
+                                  FileSpec source_path(DBGSourcePath.c_str());
                                   build_path.RemoveLastPathComponent();
                                   build_path.RemoveLastPathComponent();
                                   source_path.RemoveLastPathComponent();
@@ -281,8 +283,8 @@ SymbolVendorMacOSX::CreateInstance(const
                       if (!DBGBuildSourcePath.empty() &&
                           !DBGSourcePath.empty()) {
                         if (DBGSourcePath[0] == '~') {
-                          FileSpec resolved_source_path(DBGSourcePath.c_str(),
-                                                        true);
+                          FileSpec resolved_source_path(DBGSourcePath.c_str());
+                          FileSystem::Instance().Resolve(resolved_source_path);
                           DBGSourcePath = resolved_source_path.GetPath();
                         }
                         module_sp->GetSourceMappingList().Append(

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp Thu Nov  1 14:05:36 2018
@@ -277,7 +277,7 @@ void SystemRuntimeMacOSX::ReadLibdispatc
 
   // libdispatch symbols were in libSystem.B.dylib up through Mac OS X 10.6
   // ("Snow Leopard")
-  ModuleSpec libSystem_module_spec(FileSpec("libSystem.B.dylib", false));
+  ModuleSpec libSystem_module_spec(FileSpec("libSystem.B.dylib"));
   ModuleSP module_sp(m_process->GetTarget().GetImages().FindFirstModule(
       libSystem_module_spec));
   if (module_sp)
@@ -287,7 +287,7 @@ void SystemRuntimeMacOSX::ReadLibdispatc
   // libdispatch symbols are in their own dylib as of Mac OS X 10.7 ("Lion")
   // and later
   if (dispatch_queue_offsets_symbol == NULL) {
-    ModuleSpec libdispatch_module_spec(FileSpec("libdispatch.dylib", false));
+    ModuleSpec libdispatch_module_spec(FileSpec("libdispatch.dylib"));
     module_sp = m_process->GetTarget().GetImages().FindFirstModule(
         libdispatch_module_spec);
     if (module_sp)
@@ -331,7 +331,7 @@ void SystemRuntimeMacOSX::ReadLibpthread
       "pthread_layout_offsets");
   const Symbol *libpthread_layout_offsets_symbol = NULL;
 
-  ModuleSpec libpthread_module_spec(FileSpec("libsystem_pthread.dylib", false));
+  ModuleSpec libpthread_module_spec(FileSpec("libsystem_pthread.dylib"));
   ModuleSP module_sp(m_process->GetTarget().GetImages().FindFirstModule(
       libpthread_module_spec));
   if (module_sp) {
@@ -379,7 +379,7 @@ void SystemRuntimeMacOSX::ReadLibdispatc
       "dispatch_tsd_indexes");
   const Symbol *libdispatch_tsd_indexes_symbol = NULL;
 
-  ModuleSpec libpthread_module_spec(FileSpec("libdispatch.dylib", false));
+  ModuleSpec libpthread_module_spec(FileSpec("libdispatch.dylib"));
   ModuleSP module_sp(m_process->GetTarget().GetImages().FindFirstModule(
       libpthread_module_spec));
   if (module_sp) {

Modified: lldb/trunk/source/Symbol/CompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompileUnit.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompileUnit.cpp (original)
+++ lldb/trunk/source/Symbol/CompileUnit.cpp Thu Nov  1 14:05:36 2018
@@ -21,7 +21,7 @@ CompileUnit::CompileUnit(const lldb::Mod
                          const char *pathname, const lldb::user_id_t cu_sym_id,
                          lldb::LanguageType language,
                          lldb_private::LazyBool is_optimized)
-    : ModuleChild(module_sp), FileSpec(pathname, false), UserID(cu_sym_id),
+    : ModuleChild(module_sp), FileSpec(pathname), UserID(cu_sym_id),
       m_user_data(user_data), m_language(language), m_flags(0),
       m_support_files(), m_line_table_ap(), m_variables(),
       m_is_optimized(is_optimized) {

Modified: lldb/trunk/source/Symbol/ObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ObjectFile.cpp (original)
+++ lldb/trunk/source/Symbol/ObjectFile.cpp Thu Nov  1 14:05:36 2018
@@ -582,7 +582,7 @@ bool ObjectFile::SplitArchivePathWithObj
     std::string obj;
     if (regex_match.GetMatchAtIndex(path_with_object, 1, path) &&
         regex_match.GetMatchAtIndex(path_with_object, 2, obj)) {
-      archive_file.SetFile(path, false, FileSpec::Style::native);
+      archive_file.SetFile(path, FileSpec::Style::native);
       archive_object.SetCString(obj.c_str());
       if (must_exist && !FileSystem::Instance().Exists(archive_file))
         return false;

Modified: lldb/trunk/source/Symbol/Symbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symbol.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symbol.cpp (original)
+++ lldb/trunk/source/Symbol/Symbol.cpp Thu Nov  1 14:05:36 2018
@@ -141,7 +141,7 @@ FileSpec Symbol::GetReExportedSymbolShar
     // back into a string that is the re-exported name.
     intptr_t str_ptr = m_addr_range.GetByteSize();
     if (str_ptr != 0)
-      return FileSpec((const char *)str_ptr, false);
+      return FileSpec((const char *)str_ptr);
   }
   return FileSpec();
 }

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Thu Nov  1 14:05:36 2018
@@ -999,7 +999,7 @@ bool SymbolContextSpecifier::AddSpecific
     break;
   case eModuleSpecified: {
     // See if we can find the Module, if so stick it in the SymbolContext.
-    FileSpec module_file_spec(spec_string, false);
+    FileSpec module_file_spec(spec_string);
     ModuleSpec module_spec(module_file_spec);
     lldb::ModuleSP module_sp(
         m_target_sp->GetImages().FindFirstModule(module_spec));
@@ -1013,7 +1013,7 @@ bool SymbolContextSpecifier::AddSpecific
     // CompUnits can't necessarily be resolved here, since an inlined function
     // might show up in a number of CompUnits.  Instead we just convert to a
     // FileSpec and store it away.
-    m_file_spec_ap.reset(new FileSpec(spec_string, false));
+    m_file_spec_ap.reset(new FileSpec(spec_string));
     m_type |= eFileSpecified;
     break;
   case eLineStartSpecified:
@@ -1068,7 +1068,7 @@ bool SymbolContextSpecifier::SymbolConte
         if (m_module_sp.get() != sc.module_sp.get())
           return false;
       } else {
-        FileSpec module_file_spec(m_module_spec, false);
+        FileSpec module_file_spec(m_module_spec);
         if (!FileSpec::Equal(module_file_spec, sc.module_sp->GetFileSpec(),
                              false))
           return false;

Modified: lldb/trunk/source/Target/ModuleCache.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ModuleCache.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Target/ModuleCache.cpp (original)
+++ lldb/trunk/source/Target/ModuleCache.cpp Thu Nov  1 14:05:36 2018
@@ -76,7 +76,7 @@ FileSpec GetModuleDirectory(const FileSp
 }
 
 FileSpec GetSymbolFileSpec(const FileSpec &module_file_spec) {
-  return FileSpec(module_file_spec.GetPath() + kSymFileExtension, false);
+  return FileSpec(module_file_spec.GetPath() + kSymFileExtension);
 }
 
 void DeleteExistingModule(const FileSpec &root_dir_spec,
@@ -141,7 +141,7 @@ Status CreateHostSysRootModuleLink(const
   }
 
   const auto error = MakeDirectory(
-      FileSpec(sysroot_module_path_spec.GetDirectory().AsCString(), false));
+      FileSpec(sysroot_module_path_spec.GetDirectory().AsCString()));
   if (error.Fail())
     return error;
 

Modified: lldb/trunk/source/Target/PathMappingList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/PathMappingList.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Target/PathMappingList.cpp (original)
+++ lldb/trunk/source/Target/PathMappingList.cpp Thu Nov  1 14:05:36 2018
@@ -38,7 +38,7 @@ namespace {
   ConstString NormalizePath(const ConstString &path) {
     // If we use "path" to construct a FileSpec, it will normalize the path for
     // us. We then grab the string and turn it back into a ConstString.
-    return ConstString(FileSpec(path.GetStringRef(), false).GetPath());
+    return ConstString(FileSpec(path.GetStringRef()).GetPath());
   }
 }
 //----------------------------------------------------------------------
@@ -177,13 +177,13 @@ bool PathMappingList::RemapPath(llvm::St
       // We need to figure out if the "path" argument is relative. If it is,
       // then we should remap, else skip this entry.
       if (path_is_relative == eLazyBoolCalculate) {
-        path_is_relative = FileSpec(path, false).IsRelative() ? eLazyBoolYes :
-        eLazyBoolNo;
+        path_is_relative =
+            FileSpec(path).IsRelative() ? eLazyBoolYes : eLazyBoolNo;
       }
       if (!path_is_relative)
         continue;
     }
-    FileSpec remapped(it.second.GetStringRef(), false);
+    FileSpec remapped(it.second.GetStringRef());
     remapped.AppendPathComponent(path);
     new_path = remapped.GetPath();
     return true;
@@ -197,7 +197,7 @@ bool PathMappingList::ReverseRemapPath(c
   for (const auto &it : m_pairs) {
     if (!path_ref.consume_front(it.second.GetStringRef()))
       continue;
-    fixed.SetFile(it.first.GetStringRef(), false, FileSpec::Style::native);
+    fixed.SetFile(it.first.GetStringRef(), FileSpec::Style::native);
     fixed.AppendPathComponent(path_ref);
     return true;
   }
@@ -217,8 +217,7 @@ bool PathMappingList::FindFile(const Fil
 
         if (orig_path_len >= prefix_len) {
           if (::strncmp(pos->first.GetCString(), orig_path, prefix_len) == 0) {
-            new_spec.SetFile(pos->second.GetCString(), false,
-                             FileSpec::Style::native);
+            new_spec.SetFile(pos->second.GetCString(), FileSpec::Style::native);
             new_spec.AppendPathComponent(orig_path + prefix_len);
             if (FileSystem::Instance().Exists(new_spec))
               return true;

Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Thu Nov  1 14:05:36 2018
@@ -94,7 +94,7 @@ PlatformProperties::PlatformProperties()
   if (!llvm::sys::path::home_directory(user_home_dir))
     return;
 
-  module_cache_dir = FileSpec(user_home_dir.c_str(), false);
+  module_cache_dir = FileSpec(user_home_dir.c_str());
   module_cache_dir.AppendPathComponent(".lldb");
   module_cache_dir.AppendPathComponent("module_cache");
   SetModuleCacheDirectory(module_cache_dir);
@@ -536,9 +536,12 @@ FileSpec Platform::GetWorkingDirectory()
   if (IsHost()) {
     llvm::SmallString<64> cwd;
     if (llvm::sys::fs::current_path(cwd))
-      return FileSpec{};
-    else
-      return FileSpec(cwd, true);
+      return {};
+    else {
+      FileSpec file_spec(cwd);
+      FileSystem::Instance().Resolve(file_spec);
+      return file_spec;
+    }
   } else {
     if (!m_working_dir)
       m_working_dir = GetRemoteWorkingDirectory();
@@ -556,7 +559,7 @@ static FileSystem::EnumerateDirectoryRes
 RecurseCopy_Callback(void *baton, llvm::sys::fs::file_type ft,
                      llvm::StringRef path) {
   RecurseCopyBaton *rc_baton = (RecurseCopyBaton *)baton;
-  FileSpec src(path, false);
+  FileSpec src(path);
   namespace fs = llvm::sys::fs;
   switch (ft) {
   case fs::file_type::fifo_file:
@@ -931,7 +934,8 @@ Status Platform::ResolveSymbolFile(Targe
 bool Platform::ResolveRemotePath(const FileSpec &platform_path,
                                  FileSpec &resolved_platform_path) {
   resolved_platform_path = platform_path;
-  return resolved_platform_path.ResolvePath();
+  FileSystem::Instance().Resolve(resolved_platform_path);
+  return true;
 }
 
 const ArchSpec &Platform::GetSystemArchitecture() {
@@ -1799,9 +1803,9 @@ uint32_t Platform::LoadImageUsingPaths(l
 {
   FileSpec file_to_use;
   if (remote_filename.IsAbsolute())
-    file_to_use = FileSpec(remote_filename.GetFilename().GetStringRef(), 
-                               false, 
-                               remote_filename.GetPathStyle());
+    file_to_use = FileSpec(remote_filename.GetFilename().GetStringRef(),
+
+                           remote_filename.GetPathStyle());
   else
     file_to_use = remote_filename;
     

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Nov  1 14:05:36 2018
@@ -430,7 +430,7 @@ Status ProcessLaunchCommandOptions::SetO
   case 'i': // STDIN for read only
   {
     FileAction action;
-    if (action.Open(STDIN_FILENO, FileSpec{option_arg, false}, true, false))
+    if (action.Open(STDIN_FILENO, FileSpec(option_arg), true, false))
       launch_info.AppendFileAction(action);
     break;
   }
@@ -438,7 +438,7 @@ Status ProcessLaunchCommandOptions::SetO
   case 'o': // Open STDOUT for write only
   {
     FileAction action;
-    if (action.Open(STDOUT_FILENO, FileSpec{option_arg, false}, false, true))
+    if (action.Open(STDOUT_FILENO, FileSpec(option_arg), false, true))
       launch_info.AppendFileAction(action);
     break;
   }
@@ -446,7 +446,7 @@ Status ProcessLaunchCommandOptions::SetO
   case 'e': // STDERR for write only
   {
     FileAction action;
-    if (action.Open(STDERR_FILENO, FileSpec{option_arg, false}, false, true))
+    if (action.Open(STDERR_FILENO, FileSpec(option_arg), false, true))
       launch_info.AppendFileAction(action);
     break;
   }
@@ -458,7 +458,7 @@ Status ProcessLaunchCommandOptions::SetO
   case 'n': // Disable STDIO
   {
     FileAction action;
-    const FileSpec dev_null{FileSystem::DEV_NULL, false};
+    const FileSpec dev_null(FileSystem::DEV_NULL);
     if (action.Open(STDIN_FILENO, dev_null, true, false))
       launch_info.AppendFileAction(action);
     if (action.Open(STDOUT_FILENO, dev_null, false, true))
@@ -469,7 +469,7 @@ Status ProcessLaunchCommandOptions::SetO
   }
 
   case 'w':
-    launch_info.SetWorkingDirectory(FileSpec{option_arg, false});
+    launch_info.SetWorkingDirectory(FileSpec(option_arg));
     break;
 
   case 't': // Open process in new terminal window
@@ -515,7 +515,7 @@ Status ProcessLaunchCommandOptions::SetO
 
   case 'c':
     if (!option_arg.empty())
-      launch_info.SetShell(FileSpec(option_arg, false));
+      launch_info.SetShell(FileSpec(option_arg));
     else
       launch_info.SetShell(HostInfo::GetDefaultShell());
     break;

Modified: lldb/trunk/source/Target/ProcessInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ProcessInfo.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Target/ProcessInfo.cpp (original)
+++ lldb/trunk/source/Target/ProcessInfo.cpp Thu Nov  1 14:05:36 2018
@@ -29,8 +29,8 @@ ProcessInfo::ProcessInfo()
 
 ProcessInfo::ProcessInfo(const char *name, const ArchSpec &arch,
                          lldb::pid_t pid)
-    : m_executable(name, false), m_arguments(), m_environment(),
-      m_uid(UINT32_MAX), m_gid(UINT32_MAX), m_arch(arch), m_pid(pid) {}
+    : m_executable(name), m_arguments(), m_environment(), m_uid(UINT32_MAX),
+      m_gid(UINT32_MAX), m_arch(arch), m_pid(pid) {}
 
 void ProcessInfo::Clear() {
   m_executable.Clear();
@@ -96,8 +96,7 @@ void ProcessInfo::SetArguments(char cons
       // Yes the first argument is an executable, set it as the executable in
       // the launch options. Don't resolve the file path as the path could be a
       // remote platform path
-      const bool resolve = false;
-      m_executable.SetFile(first_arg, resolve, FileSpec::Style::native);
+      m_executable.SetFile(first_arg, FileSpec::Style::native);
     }
   }
 }
@@ -113,8 +112,7 @@ void ProcessInfo::SetArguments(const Arg
       // Yes the first argument is an executable, set it as the executable in
       // the launch options. Don't resolve the file path as the path could be a
       // remote platform path
-      const bool resolve = false;
-      m_executable.SetFile(first_arg, resolve, FileSpec::Style::native);
+      m_executable.SetFile(first_arg, FileSpec::Style::native);
     }
   }
 }

Modified: lldb/trunk/source/Target/ProcessLaunchInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ProcessLaunchInfo.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Target/ProcessLaunchInfo.cpp (original)
+++ lldb/trunk/source/Target/ProcessLaunchInfo.cpp Thu Nov  1 14:05:36 2018
@@ -108,8 +108,7 @@ bool ProcessLaunchInfo::AppendOpenFileAc
 bool ProcessLaunchInfo::AppendSuppressFileAction(int fd, bool read,
                                                  bool write) {
   FileAction file_action;
-  if (file_action.Open(fd, FileSpec{FileSystem::DEV_NULL, false}, read,
-                       write)) {
+  if (file_action.Open(fd, FileSpec(FileSystem::DEV_NULL), read, write)) {
     AppendFileAction(file_action);
     return true;
   }
@@ -306,8 +305,7 @@ void ProcessLaunchInfo::FinalizeFileActi
         open_flags |= O_CLOEXEC;
 #endif
         if (m_pty->OpenFirstAvailableMaster(open_flags, nullptr, 0)) {
-          const FileSpec slave_file_spec{m_pty->GetSlaveName(nullptr, 0),
-                                         false};
+          const FileSpec slave_file_spec(m_pty->GetSlaveName(nullptr, 0));
 
           // Only use the slave tty if we don't have anything specified for
           // input and don't have an action for stdin
@@ -359,7 +357,7 @@ bool ProcessLaunchInfo::ConvertArguments
         // Add a modified PATH environment variable in case argv[0] is a
         // relative path.
         const char *argv0 = argv[0];
-        FileSpec arg_spec(argv0, false);
+        FileSpec arg_spec(argv0);
         if (arg_spec.IsRelative()) {
           // We have a relative path to our executable which may not work if we
           // just try to run "a.out" (without it being converted to "./a.out")

Modified: lldb/trunk/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Thu Nov  1 14:05:36 2018
@@ -120,8 +120,8 @@ Status TargetList::CreateTargetInternal(
   if (!user_exe_path.empty()) {
     ModuleSpecList module_specs;
     ModuleSpec module_spec;
-    module_spec.GetFileSpec().SetFile(user_exe_path, true,
-                                      FileSpec::Style::native);
+    module_spec.GetFileSpec().SetFile(user_exe_path, FileSpec::Style::native);
+    FileSystem::Instance().Resolve(module_spec.GetFileSpec());
 
     // Resolve the executable in case we are given a path to a application
     // bundle like a .app bundle on MacOSX
@@ -346,7 +346,7 @@ Status TargetList::CreateTargetInternal(
   if (!arch.IsValid())
     arch = specified_arch;
 
-  FileSpec file(user_exe_path, false);
+  FileSpec file(user_exe_path);
   if (!FileSystem::Instance().Exists(file) && user_exe_path.startswith("~")) {
     // we want to expand the tilde but we don't want to resolve any symbolic
     // links so we can't use the FileSpec constructor's resolve flag
@@ -355,9 +355,9 @@ Status TargetList::CreateTargetInternal(
     Resolver.ResolveFullPath(user_exe_path, unglobbed_path);
 
     if (unglobbed_path.empty())
-      file = FileSpec(user_exe_path, false);
+      file = FileSpec(user_exe_path);
     else
-      file = FileSpec(unglobbed_path.c_str(), false);
+      file = FileSpec(unglobbed_path.c_str());
   }
 
   bool user_exe_path_is_bundle = false;
@@ -370,7 +370,7 @@ Status TargetList::CreateTargetInternal(
     if (file.IsRelative() && !user_exe_path.empty()) {
       llvm::SmallString<64> cwd;
       if (! llvm::sys::fs::current_path(cwd)) {
-        FileSpec cwd_file(cwd.c_str(), false);
+        FileSpec cwd_file(cwd.c_str());
         cwd_file.AppendPathComponent(file);
         if (FileSystem::Instance().Exists(cwd_file))
           file = cwd_file;

Modified: lldb/trunk/source/Utility/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/FileSpec.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/source/Utility/FileSpec.cpp (original)
+++ lldb/trunk/source/Utility/FileSpec.cpp Thu Nov  1 14:05:36 2018
@@ -10,7 +10,6 @@
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/Stream.h"
-#include "lldb/Utility/TildeExpressionResolver.h"
 
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/SmallVector.h"
@@ -67,38 +66,17 @@ void Denormalize(llvm::SmallVectorImpl<c
 
 } // end anonymous namespace
 
-void FileSpec::Resolve(llvm::SmallVectorImpl<char> &path) {
-  if (path.empty())
-    return;
-
-  llvm::SmallString<32> Source(path.begin(), path.end());
-  StandardTildeExpressionResolver Resolver;
-  Resolver.ResolveFullPath(Source, path);
-
-  // Save a copy of the original path that's passed in
-  llvm::SmallString<128> original_path(path.begin(), path.end());
-
-  llvm::sys::fs::make_absolute(path);
-  if (!llvm::sys::fs::exists(path)) {
-    path.clear();
-    path.append(original_path.begin(), original_path.end());
-  }
-}
-
 FileSpec::FileSpec() : m_style(GetNativeStyle()) {}
 
 //------------------------------------------------------------------
 // Default constructor that can take an optional full path to a file on disk.
 //------------------------------------------------------------------
-FileSpec::FileSpec(llvm::StringRef path, bool resolve_path, Style style)
-    : m_style(style) {
-  SetFile(path, resolve_path, style);
+FileSpec::FileSpec(llvm::StringRef path, Style style) : m_style(style) {
+  SetFile(path, style);
 }
 
-FileSpec::FileSpec(llvm::StringRef path, bool resolve_path,
-                   const llvm::Triple &Triple)
-    : FileSpec{path, resolve_path,
-               Triple.isOSWindows() ? Style::windows : Style::posix} {}
+FileSpec::FileSpec(llvm::StringRef path, const llvm::Triple &Triple)
+    : FileSpec{path, Triple.isOSWindows() ? Style::windows : Style::posix} {}
 
 //------------------------------------------------------------------
 // Copy constructor
@@ -227,16 +205,14 @@ const FileSpec &FileSpec::operator=(cons
   return *this;
 }
 
-void FileSpec::SetFile(llvm::StringRef pathname, bool resolve) {
-  SetFile(pathname, resolve, m_style);
-}
+void FileSpec::SetFile(llvm::StringRef pathname) { SetFile(pathname, m_style); }
 
 //------------------------------------------------------------------
 // Update the contents of this object with a new path. The path will be split
 // up into a directory and filename and stored as uniqued string values for
 // quick comparison and efficient memory usage.
 //------------------------------------------------------------------
-void FileSpec::SetFile(llvm::StringRef pathname, bool resolve, Style style) {
+void FileSpec::SetFile(llvm::StringRef pathname, Style style) {
   m_filename.Clear();
   m_directory.Clear();
   m_is_resolved = false;
@@ -245,12 +221,7 @@ void FileSpec::SetFile(llvm::StringRef p
   if (pathname.empty())
     return;
 
-  llvm::SmallString<64> resolved(pathname);
-
-  if (resolve) {
-    FileSpec::Resolve(resolved);
-    m_is_resolved = true;
-  }
+  llvm::SmallString<128> resolved(pathname);
 
   // Normalize the path by removing ".", ".." and other redundant components.
   if (needsNormalization(resolved))
@@ -273,15 +244,14 @@ void FileSpec::SetFile(llvm::StringRef p
   llvm::StringRef filename = llvm::sys::path::filename(resolved, m_style);
   if(!filename.empty())
     m_filename.SetString(filename);
+
   llvm::StringRef directory = llvm::sys::path::parent_path(resolved, m_style);
   if(!directory.empty())
     m_directory.SetString(directory);
 }
 
-void FileSpec::SetFile(llvm::StringRef path, bool resolve,
-                       const llvm::Triple &Triple) {
-  return SetFile(path, resolve,
-                 Triple.isOSWindows() ? Style::windows : Style::posix);
+void FileSpec::SetFile(llvm::StringRef path, const llvm::Triple &Triple) {
+  return SetFile(path, Triple.isOSWindows() ? Style::windows : Style::posix);
 }
 
 //----------------------------------------------------------------------
@@ -316,49 +286,7 @@ bool FileSpec::FileEquals(const FileSpec
 // Equal to operator
 //------------------------------------------------------------------
 bool FileSpec::operator==(const FileSpec &rhs) const {
-  if (!FileEquals(rhs))
-    return false;
-  if (DirectoryEquals(rhs))
-    return true;
-
-  // TODO: determine if we want to keep this code in here.
-  // The code below was added to handle a case where we were trying to set a
-  // file and line breakpoint and one path was resolved, and the other not and
-  // the directory was in a mount point that resolved to a more complete path:
-  // "/tmp/a.c" == "/private/tmp/a.c". I might end up pulling this out...
-  if (IsResolved() && rhs.IsResolved()) {
-    // Both paths are resolved, no need to look further...
-    return false;
-  }
-
-  FileSpec resolved_lhs(*this);
-
-  // If "this" isn't resolved, resolve it
-  if (!IsResolved()) {
-    if (resolved_lhs.ResolvePath()) {
-      // This path wasn't resolved but now it is. Check if the resolved
-      // directory is the same as our unresolved directory, and if so, we can
-      // mark this object as resolved to avoid more future resolves
-      m_is_resolved = (m_directory == resolved_lhs.m_directory);
-    } else
-      return false;
-  }
-
-  FileSpec resolved_rhs(rhs);
-  if (!rhs.IsResolved()) {
-    if (resolved_rhs.ResolvePath()) {
-      // rhs's path wasn't resolved but now it is. Check if the resolved
-      // directory is the same as rhs's unresolved directory, and if so, we can
-      // mark this object as resolved to avoid more future resolves
-      rhs.m_is_resolved = (rhs.m_directory == resolved_rhs.m_directory);
-    } else
-      return false;
-  }
-
-  // If we reach this point in the code we were able to resolve both paths and
-  // since we only resolve the paths if the basenames are equal, then we can
-  // just check if both directories are equal...
-  return DirectoryEquals(rhs);
+  return FileEquals(rhs) && DirectoryEquals(rhs);
 }
 
 //------------------------------------------------------------------
@@ -453,15 +381,6 @@ void FileSpec::Dump(Stream *s) const {
   }
 }
 
-bool FileSpec::ResolvePath() {
-  if (m_is_resolved)
-    return true; // We have already resolved this path
-
-  // SetFile(...) will set m_is_resolved correctly if it can resolve the path
-  SetFile(GetPath(false), true);
-  return m_is_resolved;
-}
-
 FileSpec::Style FileSpec::GetPathStyle() const { return m_style; }
 
 //------------------------------------------------------------------
@@ -552,7 +471,7 @@ FileSpec FileSpec::CopyByRemovingLastPat
   llvm::SmallString<64> current_path;
   GetPath(current_path, false);
   if (llvm::sys::path::has_parent_path(current_path, m_style))
-    return FileSpec(llvm::sys::path::parent_path(current_path, m_style), false,
+    return FileSpec(llvm::sys::path::parent_path(current_path, m_style),
                     m_style);
   return *this;
 }
@@ -570,7 +489,7 @@ void FileSpec::PrependPathComponent(llvm
   llvm::sys::path::append(new_path,
                           llvm::sys::path::begin(current_path, m_style),
                           llvm::sys::path::end(current_path), m_style);
-  SetFile(new_path, false, m_style);
+  SetFile(new_path, m_style);
 }
 
 void FileSpec::PrependPathComponent(const FileSpec &new_path) {
@@ -581,7 +500,7 @@ void FileSpec::AppendPathComponent(llvm:
   llvm::SmallString<64> current_path;
   GetPath(current_path, false);
   llvm::sys::path::append(current_path, m_style, component);
-  SetFile(current_path, false, m_style);
+  SetFile(current_path, m_style);
 }
 
 void FileSpec::AppendPathComponent(const FileSpec &new_path) {
@@ -592,7 +511,7 @@ bool FileSpec::RemoveLastPathComponent()
   llvm::SmallString<64> current_path;
   GetPath(current_path, false);
   if (llvm::sys::path::has_parent_path(current_path, m_style)) {
-    SetFile(llvm::sys::path::parent_path(current_path, m_style), false);
+    SetFile(llvm::sys::path::parent_path(current_path, m_style));
     return true;
   }
   return false;

Modified: lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp (original)
+++ lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp Thu Nov  1 14:05:36 2018
@@ -21,13 +21,13 @@
 
 // C++ Includes
 
-
 #include "Acceptor.h"
 #include "LLDBServerUtilities.h"
 #include "Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h"
 #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Host/ConnectionFileDescriptor.h"
+#include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostGetOpt.h"
 #include "lldb/Host/OptionParser.h"
 #include "lldb/Host/Pipe.h"
@@ -187,7 +187,9 @@ void handle_launch(GDBRemoteCommunicatio
     llvm::errs() << "Error getting current directory: " << ec.message() << "\n";
     exit(1);
   }
-  info.SetWorkingDirectory(FileSpec(cwd, true));
+  FileSpec cwd_spec(cwd);
+  FileSystem::Instance().Resolve(cwd_spec);
+  info.SetWorkingDirectory(cwd_spec);
   info.GetEnvironment() = Host::GetEnvironment();
 
   gdb_server.SetLaunchInfo(info);

Modified: lldb/trunk/tools/lldb-server/lldb-platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-platform.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/lldb-platform.cpp (original)
+++ lldb/trunk/tools/lldb-server/lldb-platform.cpp Thu Nov  1 14:05:36 2018
@@ -100,7 +100,7 @@ static void display_usage(const char *pr
 
 static Status save_socket_id_to_file(const std::string &socket_id,
                                      const FileSpec &file_spec) {
-  FileSpec temp_file_spec(file_spec.GetDirectory().AsCString(), false);
+  FileSpec temp_file_spec(file_spec.GetDirectory().AsCString());
   Status error(llvm::sys::fs::create_directory(temp_file_spec.GetPath()));
   if (error.Fail())
     return Status("Failed to create directory %s: %s",
@@ -193,7 +193,7 @@ int main_platform(int argc, char *argv[]
 
     case 'f': // Socket file
       if (optarg && optarg[0])
-        socket_file.SetFile(optarg, false, FileSpec::Style::native);
+        socket_file.SetFile(optarg, FileSpec::Style::native);
       break;
 
     case 'p': {

Modified: lldb/trunk/tools/lldb-test/lldb-test.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-test/lldb-test.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-test/lldb-test.cpp (original)
+++ lldb/trunk/tools/lldb-test/lldb-test.cpp Thu Nov  1 14:05:36 2018
@@ -347,7 +347,7 @@ Error opts::symbols::findFunctions(lldb_
   if (!File.empty()) {
     assert(Line != 0);
 
-    FileSpec src_file(File, false);
+    FileSpec src_file(File);
     size_t cu_count = Module.GetNumCompileUnits();
     for (size_t i = 0; i < cu_count; i++) {
       lldb::CompUnitSP cu_sp = Module.GetCompileUnitAtIndex(i);
@@ -397,7 +397,7 @@ Error opts::symbols::findBlocks(lldb_pri
 
   SymbolContextList List;
 
-  FileSpec src_file(File, false);
+  FileSpec src_file(File);
   size_t cu_count = Module.GetNumCompileUnits();
   for (size_t i = 0; i < cu_count; i++) {
     lldb::CompUnitSP cu_sp = Module.GetCompileUnitAtIndex(i);
@@ -695,8 +695,8 @@ int opts::symbols::dumpSymbols(Debugger
   int HadErrors = 0;
   for (const auto &File : InputFilenames) {
     outs() << "Module: " << File << "\n";
-    ModuleSpec Spec{FileSpec(File, false)};
-    Spec.GetSymbolFileSpec().SetFile(File, false, FileSpec::Style::native);
+    ModuleSpec Spec{FileSpec(File)};
+    Spec.GetSymbolFileSpec().SetFile(File, FileSpec::Style::native);
 
     auto ModulePtr = std::make_shared<lldb_private::Module>(Spec);
     SymbolVendor *Vendor = ModulePtr->GetSymbolVendor();
@@ -721,7 +721,7 @@ static int dumpObjectFiles(Debugger &Dbg
 
   int HadErrors = 0;
   for (const auto &File : opts::object::InputFilenames) {
-    ModuleSpec Spec{FileSpec(File, false)};
+    ModuleSpec Spec{FileSpec(File)};
 
     auto ModulePtr = std::make_shared<lldb_private::Module>(Spec);
     // Fetch symbol vendor before we get the section list to give the symbol

Modified: lldb/trunk/unittests/Core/MangledTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/MangledTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/MangledTest.cpp (original)
+++ lldb/trunk/unittests/Core/MangledTest.cpp Thu Nov  1 14:05:36 2018
@@ -83,8 +83,8 @@ TEST(MangledTest, NameIndexes_FindFuncti
   ASSERT_NO_ERROR(llvm::sys::fs::file_size(Obj, Size));
   ASSERT_GT(Size, 0u);
 
-  ModuleSpec Spec{FileSpec(Obj, false)};
-  Spec.GetSymbolFileSpec().SetFile(Obj, false, FileSpec::Style::native);
+  ModuleSpec Spec{FileSpec(Obj)};
+  Spec.GetSymbolFileSpec().SetFile(Obj, FileSpec::Style::native);
   auto M = std::make_shared<Module>(Spec);
 
   auto Count = [M](const char *Name, FunctionNameType Type) -> int {

Modified: lldb/trunk/unittests/Editline/EditlineTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Editline/EditlineTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Editline/EditlineTest.cpp (original)
+++ lldb/trunk/unittests/Editline/EditlineTest.cpp Thu Nov  1 14:05:36 2018
@@ -20,6 +20,7 @@
 #include "gtest/gtest.h"
 
 #include "lldb/Host/Editline.h"
+#include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Pipe.h"
 #include "lldb/Host/PseudoTerminal.h"
 #include "lldb/Utility/Status.h"
@@ -246,6 +247,8 @@ private:
 
 public:
   void SetUp() {
+    FileSystem::Initialize();
+
     // We need a TERM set properly for editline to work as expected.
     setenv("TERM", "vt100", 1);
 
@@ -263,6 +266,8 @@ public:
     _el_adapter.CloseInput();
     if (_sp_output_thread)
       _sp_output_thread->join();
+
+    FileSystem::Terminate();
   }
 
   EditlineAdapter &GetEditlineAdapter() { return _el_adapter; }

Modified: lldb/trunk/unittests/Expression/ClangParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Expression/ClangParserTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Expression/ClangParserTest.cpp (original)
+++ lldb/trunk/unittests/Expression/ClangParserTest.cpp Thu Nov  1 14:05:36 2018
@@ -34,7 +34,7 @@ struct ClangHostTest : public testing::T
 static std::string ComputeClangDir(std::string lldb_shlib_path,
                                    bool verify = false) {
   FileSpec clang_dir;
-  FileSpec lldb_shlib_spec(lldb_shlib_path, false);
+  FileSpec lldb_shlib_spec(lldb_shlib_path);
   ComputeClangDirectory(lldb_shlib_spec, clang_dir, verify);
   return clang_dir.GetPath();
 }

Modified: lldb/trunk/unittests/Host/FileSystemTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/FileSystemTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Host/FileSystemTest.cpp (original)
+++ lldb/trunk/unittests/Host/FileSystemTest.cpp Thu Nov  1 14:05:36 2018
@@ -158,16 +158,16 @@ public:
 
 TEST(FileSystemTest, FileAndDirectoryComponents) {
   using namespace std::chrono;
+  FileSystem fs;
 
-  const bool resolve = true;
 #ifdef _WIN32
-  FileSpec fs1("C:\\FILE\\THAT\\DOES\\NOT\\EXIST.TXT", !resolve);
+  FileSpec fs1("C:\\FILE\\THAT\\DOES\\NOT\\EXIST.TXT");
 #else
-  FileSpec fs1("/file/that/does/not/exist.txt", !resolve);
+  FileSpec fs1("/file/that/does/not/exist.txt");
 #endif
-  FileSpec fs2(TestMainArgv0, resolve);
+  FileSpec fs2(TestMainArgv0);
 
-  FileSystem fs;
+  fs.Resolve(fs2);
 
   EXPECT_EQ(system_clock::time_point(), fs.GetModificationTime(fs1));
   EXPECT_LT(system_clock::time_point() + hours(24 * 365 * 20),
@@ -188,17 +188,17 @@ TEST(FileSystemTest, Exists) {
   FileSystem fs(GetSimpleDummyFS());
 
   EXPECT_TRUE(fs.Exists("/foo"));
-  EXPECT_TRUE(fs.Exists(FileSpec("/foo", false, FileSpec::Style::posix)));
+  EXPECT_TRUE(fs.Exists(FileSpec("/foo", FileSpec::Style::posix)));
 }
 
 TEST(FileSystemTest, Readable) {
   FileSystem fs(GetSimpleDummyFS());
 
   EXPECT_TRUE(fs.Readable("/foo"));
-  EXPECT_TRUE(fs.Readable(FileSpec("/foo", false, FileSpec::Style::posix)));
+  EXPECT_TRUE(fs.Readable(FileSpec("/foo", FileSpec::Style::posix)));
 
   EXPECT_FALSE(fs.Readable("/qux"));
-  EXPECT_FALSE(fs.Readable(FileSpec("/qux", false, FileSpec::Style::posix)));
+  EXPECT_FALSE(fs.Readable(FileSpec("/qux", FileSpec::Style::posix)));
 }
 
 TEST(FileSystemTest, GetByteSize) {
@@ -206,7 +206,7 @@ TEST(FileSystemTest, GetByteSize) {
 
   EXPECT_EQ((uint64_t)1024, fs.GetByteSize("/foo"));
   EXPECT_EQ((uint64_t)1024,
-            fs.GetByteSize(FileSpec("/foo", false, FileSpec::Style::posix)));
+            fs.GetByteSize(FileSpec("/foo", FileSpec::Style::posix)));
 }
 
 TEST(FileSystemTest, GetPermissions) {
@@ -214,7 +214,7 @@ TEST(FileSystemTest, GetPermissions) {
 
   EXPECT_EQ(sys::fs::all_all, fs.GetPermissions("/foo"));
   EXPECT_EQ(sys::fs::all_all,
-            fs.GetPermissions(FileSpec("/foo", false, FileSpec::Style::posix)));
+            fs.GetPermissions(FileSpec("/foo", FileSpec::Style::posix)));
 }
 
 TEST(FileSystemTest, MakeAbsolute) {
@@ -229,7 +229,7 @@ TEST(FileSystemTest, MakeAbsolute) {
   }
 
   {
-    FileSpec file_spec("foo", false);
+    FileSpec file_spec("foo");
     auto EC = fs.MakeAbsolute(file_spec);
     EXPECT_FALSE(EC);
     EXPECT_EQ("/foo", file_spec.GetPath());
@@ -247,7 +247,7 @@ TEST(FileSystemTest, Resolve) {
   }
 
   {
-    FileSpec file_spec("foo", false);
+    FileSpec file_spec("foo");
     fs.Resolve(file_spec);
     EXPECT_EQ("/foo", file_spec.GetPath());
   }
@@ -260,7 +260,7 @@ TEST(FileSystemTest, Resolve) {
   }
 
   {
-    FileSpec file_spec("bogus", false);
+    FileSpec file_spec("bogus");
     fs.Resolve(file_spec);
     EXPECT_EQ("bogus", file_spec.GetPath());
   }

Modified: lldb/trunk/unittests/Host/SymbolsTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/SymbolsTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Host/SymbolsTest.cpp (original)
+++ lldb/trunk/unittests/Host/SymbolsTest.cpp Thu Nov  1 14:05:36 2018
@@ -43,8 +43,7 @@ TEST_F(SymbolsTest,
   ModuleSpec module_spec;
   // using a GUID here because the symbol file shouldn't actually exist on disk
   module_spec.GetSymbolFileSpec().SetFile(
-      "4A524676-B24B-4F4E-968A-551D465EBAF1.so", false,
-      FileSpec::Style::native);
+      "4A524676-B24B-4F4E-968A-551D465EBAF1.so", FileSpec::Style::native);
   FileSpec symbol_file_spec = Symbols::LocateExecutableSymbolFile(module_spec);
   EXPECT_TRUE(symbol_file_spec.GetFilename().IsEmpty());
 }

Modified: lldb/trunk/unittests/Host/linux/HostTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/linux/HostTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Host/linux/HostTest.cpp (original)
+++ lldb/trunk/unittests/Host/linux/HostTest.cpp Thu Nov  1 14:05:36 2018
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Host/Host.h"
+#include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Target/Process.h"
 #include "gtest/gtest.h"
@@ -17,8 +18,14 @@ using namespace lldb_private;
 namespace {
 class HostTest : public testing::Test {
 public:
-  static void SetUpTestCase() { HostInfo::Initialize(); }
-  static void TearDownTestCase() { HostInfo::Terminate(); }
+  static void SetUpTestCase() {
+    FileSystem::Initialize();
+    HostInfo::Initialize();
+  }
+  static void TearDownTestCase() {
+    HostInfo::Terminate();
+    FileSystem::Terminate();
+  }
 };
 } // namespace
 

Modified: lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp (original)
+++ lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp Thu Nov  1 14:05:36 2018
@@ -74,8 +74,8 @@ TEST_F(ObjectFileELFTest, SectionsResolv
   ASSERT_NO_ERROR(llvm::sys::fs::file_size(obj, size));
   ASSERT_GT(size, 0u);
 
-  ModuleSpec spec{FileSpec(obj, false)};
-  spec.GetSymbolFileSpec().SetFile(obj, false, FileSpec::Style::native);
+  ModuleSpec spec{FileSpec(obj)};
+  spec.GetSymbolFileSpec().SetFile(obj, FileSpec::Style::native);
   auto module_sp = std::make_shared<Module>(spec);
   SectionList *list = module_sp->GetSectionList();
   ASSERT_NE(nullptr, list);
@@ -134,7 +134,7 @@ Sections:
 TEST_F(ObjectFileELFTest, GetModuleSpecifications_EarlySectionHeaders) {
   std::string SO = GetInputFilePath("early-section-headers.so");
   ModuleSpecList Specs;
-  ASSERT_EQ(1u, ObjectFile::GetModuleSpecifications(FileSpec(SO, false), 0, 0, Specs));
+  ASSERT_EQ(1u, ObjectFile::GetModuleSpecifications(FileSpec(SO), 0, 0, Specs));
   ModuleSpec Spec;
   ASSERT_TRUE(Specs.GetModuleSpecAtIndex(0, Spec)) ;
   UUID Uuid;

Modified: lldb/trunk/unittests/Platform/PlatformDarwinTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Platform/PlatformDarwinTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Platform/PlatformDarwinTest.cpp (original)
+++ lldb/trunk/unittests/Platform/PlatformDarwinTest.cpp Thu Nov  1 14:05:36 2018
@@ -55,19 +55,18 @@ TEST(PlatformDarwinTest, TestParseVersio
   std::string base = "/Applications/Xcode.app/Contents/Developer/Platforms/";
   EXPECT_TRUE(PlatformDarwinTester::SDKSupportsModules(
       PlatformDarwin::SDKType::iPhoneSimulator,
-      FileSpec(base +
-          "iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk",
-          false)));
+      FileSpec(
+          base +
+          "iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk")));
   EXPECT_FALSE(PlatformDarwinTester::SDKSupportsModules(
       PlatformDarwin::SDKType::iPhoneSimulator,
-      FileSpec(base +
-          "iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.2.sdk",
-          false)));
+      FileSpec(
+          base +
+          "iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.2.sdk")));
   EXPECT_TRUE(PlatformDarwinTester::SDKSupportsModules(
       PlatformDarwin::SDKType::MacOSX,
-      FileSpec(base + "MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk",
-               false)));
+      FileSpec(base + "MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk")));
   EXPECT_FALSE(PlatformDarwinTester::SDKSupportsModules(
       PlatformDarwin::SDKType::MacOSX,
-      FileSpec(base + "MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk", false)));
+      FileSpec(base + "MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk")));
 }

Modified: lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp (original)
+++ lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp Thu Nov  1 14:05:36 2018
@@ -169,14 +169,14 @@ TEST_F(GDBRemoteCommunicationClientTest,
   llvm::Triple triple("i386-pc-linux");
 
   FileSpec file_specs[] = {
-      FileSpec("/foo/bar.so", false, FileSpec::Style::posix),
-      FileSpec("/foo/baz.so", false, FileSpec::Style::posix),
+      FileSpec("/foo/bar.so", FileSpec::Style::posix),
+      FileSpec("/foo/baz.so", FileSpec::Style::posix),
 
       // This is a bit dodgy but we currently depend on GetModulesInfo not
       // performing denormalization. It can go away once the users
       // (DynamicLoaderPOSIXDYLD, at least) correctly set the path syntax for
       // the FileSpecs they create.
-      FileSpec("/foo/baw.so", false, FileSpec::Style::windows),
+      FileSpec("/foo/baw.so", FileSpec::Style::windows),
   };
   std::future<llvm::Optional<std::vector<ModuleSpec>>> async_result =
       std::async(std::launch::async,
@@ -203,7 +203,7 @@ TEST_F(GDBRemoteCommunicationClientTest,
 TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo_UUID20) {
   llvm::Triple triple("i386-pc-linux");
 
-  FileSpec file_spec("/foo/bar.so", false, FileSpec::Style::posix);
+  FileSpec file_spec("/foo/bar.so", FileSpec::Style::posix);
   std::future<llvm::Optional<std::vector<ModuleSpec>>> async_result =
       std::async(std::launch::async,
                  [&] { return client.GetModulesInfo(file_spec, triple); });
@@ -227,7 +227,7 @@ TEST_F(GDBRemoteCommunicationClientTest,
 
 TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfoInvalidResponse) {
   llvm::Triple triple("i386-pc-linux");
-  FileSpec file_spec("/foo/bar.so", false, FileSpec::Style::posix);
+  FileSpec file_spec("/foo/bar.so", FileSpec::Style::posix);
 
   const char *invalid_responses[] = {
       // no UUID

Modified: lldb/trunk/unittests/Symbol/TestDWARFCallFrameInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Symbol/TestDWARFCallFrameInfo.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Symbol/TestDWARFCallFrameInfo.cpp (original)
+++ lldb/trunk/unittests/Symbol/TestDWARFCallFrameInfo.cpp Thu Nov  1 14:05:36 2018
@@ -113,7 +113,7 @@ void DWARFCallFrameInfoTest::TestBasic(D
   ASSERT_NO_ERROR(llvm::sys::fs::file_size(obj, size));
   ASSERT_GT(size, 0u);
 
-  auto module_sp = std::make_shared<Module>(ModuleSpec(FileSpec(obj, false)));
+  auto module_sp = std::make_shared<Module>(ModuleSpec(FileSpec(obj)));
   SectionList *list = module_sp->GetSectionList();
   ASSERT_NE(nullptr, list);
 

Modified: lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp (original)
+++ lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp Thu Nov  1 14:05:36 2018
@@ -64,7 +64,7 @@ protected:
 
 TEST_F(SymbolFileDWARFTests, TestAbilitiesForDWARF) {
   // Test that when we have Dwarf debug info, SymbolFileDWARF is used.
-  FileSpec fspec(m_dwarf_test_exe, false);
+  FileSpec fspec(m_dwarf_test_exe);
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 

Modified: lldb/trunk/unittests/Target/ModuleCacheTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Target/ModuleCacheTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Target/ModuleCacheTest.cpp (original)
+++ lldb/trunk/unittests/Target/ModuleCacheTest.cpp Thu Nov  1 14:05:36 2018
@@ -45,7 +45,7 @@ static const uint32_t uuid_bytes = 20;
 static const size_t module_size = 5602;
 
 static FileSpec GetDummyRemotePath() {
-  FileSpec fs("/", false, FileSpec::Style::posix);
+  FileSpec fs("/", FileSpec::Style::posix);
   fs.AppendPathComponent(dummy_remote_dir);
   fs.AppendPathComponent(module_name);
   return fs;

Modified: lldb/trunk/unittests/Target/PathMappingListTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Target/PathMappingListTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Target/PathMappingListTest.cpp (original)
+++ lldb/trunk/unittests/Target/PathMappingListTest.cpp Thu Nov  1 14:05:36 2018
@@ -19,8 +19,7 @@ namespace {
 struct Matches {
   FileSpec original;
   FileSpec remapped;
-  Matches(const char *o, const char *r)
-      : original(o, false), remapped(r, false) {}
+  Matches(const char *o, const char *r) : original(o), remapped(r) {}
 };
 } // namespace
 
@@ -38,7 +37,7 @@ static void TestPathMappings(const PathM
     std::string orig_normalized = match.original.GetPath();
     EXPECT_TRUE(
         map.RemapPath(ConstString(match.original.GetPath()), actual_remapped));
-    EXPECT_EQ(FileSpec(actual_remapped.GetStringRef(), false), match.remapped);
+    EXPECT_EQ(FileSpec(actual_remapped.GetStringRef()), match.remapped);
     FileSpec unmapped_spec;
     EXPECT_TRUE(map.ReverseRemapPath(match.remapped, unmapped_spec));
     std::string unmapped_path = unmapped_spec.GetPath();

Modified: lldb/trunk/unittests/Utility/FileSpecTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/FileSpecTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Utility/FileSpecTest.cpp (original)
+++ lldb/trunk/unittests/Utility/FileSpecTest.cpp Thu Nov  1 14:05:36 2018
@@ -14,92 +14,91 @@
 using namespace lldb_private;
 
 TEST(FileSpecTest, FileAndDirectoryComponents) {
-  FileSpec fs_posix("/foo/bar", false, FileSpec::Style::posix);
+  FileSpec fs_posix("/foo/bar", FileSpec::Style::posix);
   EXPECT_STREQ("/foo/bar", fs_posix.GetCString());
   EXPECT_STREQ("/foo", fs_posix.GetDirectory().GetCString());
   EXPECT_STREQ("bar", fs_posix.GetFilename().GetCString());
 
-  FileSpec fs_windows("F:\\bar", false, FileSpec::Style::windows);
+  FileSpec fs_windows("F:\\bar", FileSpec::Style::windows);
   EXPECT_STREQ("F:\\bar", fs_windows.GetCString());
   // EXPECT_STREQ("F:\\", fs_windows.GetDirectory().GetCString()); // It returns
   // "F:/"
   EXPECT_STREQ("bar", fs_windows.GetFilename().GetCString());
 
-  FileSpec fs_posix_root("/", false, FileSpec::Style::posix);
+  FileSpec fs_posix_root("/", FileSpec::Style::posix);
   EXPECT_STREQ("/", fs_posix_root.GetCString());
   EXPECT_EQ(nullptr, fs_posix_root.GetDirectory().GetCString());
   EXPECT_STREQ("/", fs_posix_root.GetFilename().GetCString());
 
-  FileSpec fs_net_drive("//net", false, FileSpec::Style::posix);
+  FileSpec fs_net_drive("//net", FileSpec::Style::posix);
   EXPECT_STREQ("//net", fs_net_drive.GetCString());
   EXPECT_EQ(nullptr, fs_net_drive.GetDirectory().GetCString());
   EXPECT_STREQ("//net", fs_net_drive.GetFilename().GetCString());
 
-  FileSpec fs_net_root("//net/", false, FileSpec::Style::posix);
+  FileSpec fs_net_root("//net/", FileSpec::Style::posix);
   EXPECT_STREQ("//net/", fs_net_root.GetCString());
   EXPECT_STREQ("//net", fs_net_root.GetDirectory().GetCString());
   EXPECT_STREQ("/", fs_net_root.GetFilename().GetCString());
 
-  FileSpec fs_windows_drive("F:", false, FileSpec::Style::windows);
+  FileSpec fs_windows_drive("F:", FileSpec::Style::windows);
   EXPECT_STREQ("F:", fs_windows_drive.GetCString());
   EXPECT_EQ(nullptr, fs_windows_drive.GetDirectory().GetCString());
   EXPECT_STREQ("F:", fs_windows_drive.GetFilename().GetCString());
 
-  FileSpec fs_windows_root("F:\\", false, FileSpec::Style::windows);
+  FileSpec fs_windows_root("F:\\", FileSpec::Style::windows);
   EXPECT_STREQ("F:\\", fs_windows_root.GetCString());
   EXPECT_STREQ("F:", fs_windows_root.GetDirectory().GetCString());
   // EXPECT_STREQ("\\", fs_windows_root.GetFilename().GetCString()); // It
   // returns "/"
 
-  FileSpec fs_posix_long("/foo/bar/baz", false, FileSpec::Style::posix);
+  FileSpec fs_posix_long("/foo/bar/baz", FileSpec::Style::posix);
   EXPECT_STREQ("/foo/bar/baz", fs_posix_long.GetCString());
   EXPECT_STREQ("/foo/bar", fs_posix_long.GetDirectory().GetCString());
   EXPECT_STREQ("baz", fs_posix_long.GetFilename().GetCString());
 
-  FileSpec fs_windows_long("F:\\bar\\baz", false, FileSpec::Style::windows);
+  FileSpec fs_windows_long("F:\\bar\\baz", FileSpec::Style::windows);
   EXPECT_STREQ("F:\\bar\\baz", fs_windows_long.GetCString());
   // EXPECT_STREQ("F:\\bar", fs_windows_long.GetDirectory().GetCString()); // It
   // returns "F:/bar"
   EXPECT_STREQ("baz", fs_windows_long.GetFilename().GetCString());
 
-  FileSpec fs_posix_trailing_slash("/foo/bar/", false, FileSpec::Style::posix);
+  FileSpec fs_posix_trailing_slash("/foo/bar/", FileSpec::Style::posix);
   EXPECT_STREQ("/foo/bar", fs_posix_trailing_slash.GetCString());
   EXPECT_STREQ("/foo", fs_posix_trailing_slash.GetDirectory().GetCString());
   EXPECT_STREQ("bar", fs_posix_trailing_slash.GetFilename().GetCString());
 
-  FileSpec fs_windows_trailing_slash("F:\\bar\\", false,
-                                     FileSpec::Style::windows);
+  FileSpec fs_windows_trailing_slash("F:\\bar\\", FileSpec::Style::windows);
   EXPECT_STREQ("F:\\bar", fs_windows_trailing_slash.GetCString());
   EXPECT_STREQ("bar", fs_windows_trailing_slash.GetFilename().GetCString());
 }
 
 TEST(FileSpecTest, AppendPathComponent) {
-  FileSpec fs_posix("/foo", false, FileSpec::Style::posix);
+  FileSpec fs_posix("/foo", FileSpec::Style::posix);
   fs_posix.AppendPathComponent("bar");
   EXPECT_STREQ("/foo/bar", fs_posix.GetCString());
   EXPECT_STREQ("/foo", fs_posix.GetDirectory().GetCString());
   EXPECT_STREQ("bar", fs_posix.GetFilename().GetCString());
 
-  FileSpec fs_posix_2("/foo", false, FileSpec::Style::posix);
+  FileSpec fs_posix_2("/foo", FileSpec::Style::posix);
   fs_posix_2.AppendPathComponent("//bar/baz");
   EXPECT_STREQ("/foo/bar/baz", fs_posix_2.GetCString());
   EXPECT_STREQ("/foo/bar", fs_posix_2.GetDirectory().GetCString());
   EXPECT_STREQ("baz", fs_posix_2.GetFilename().GetCString());
 
-  FileSpec fs_windows("F:\\bar", false, FileSpec::Style::windows);
+  FileSpec fs_windows("F:\\bar", FileSpec::Style::windows);
   fs_windows.AppendPathComponent("baz");
   EXPECT_STREQ("F:\\bar\\baz", fs_windows.GetCString());
   // EXPECT_STREQ("F:\\bar", fs_windows.GetDirectory().GetCString()); // It
   // returns "F:/bar"
   EXPECT_STREQ("baz", fs_windows.GetFilename().GetCString());
 
-  FileSpec fs_posix_root("/", false, FileSpec::Style::posix);
+  FileSpec fs_posix_root("/", FileSpec::Style::posix);
   fs_posix_root.AppendPathComponent("bar");
   EXPECT_STREQ("/bar", fs_posix_root.GetCString());
   EXPECT_STREQ("/", fs_posix_root.GetDirectory().GetCString());
   EXPECT_STREQ("bar", fs_posix_root.GetFilename().GetCString());
 
-  FileSpec fs_windows_root("F:\\", false, FileSpec::Style::windows);
+  FileSpec fs_windows_root("F:\\", FileSpec::Style::windows);
   fs_windows_root.AppendPathComponent("bar");
   EXPECT_STREQ("F:\\bar", fs_windows_root.GetCString());
   // EXPECT_STREQ("F:\\", fs_windows_root.GetDirectory().GetCString()); // It
@@ -108,7 +107,7 @@ TEST(FileSpecTest, AppendPathComponent)
 }
 
 TEST(FileSpecTest, CopyByAppendingPathComponent) {
-  FileSpec fs = FileSpec("/foo", false, FileSpec::Style::posix)
+  FileSpec fs = FileSpec("/foo", FileSpec::Style::posix)
                     .CopyByAppendingPathComponent("bar");
   EXPECT_STREQ("/foo/bar", fs.GetCString());
   EXPECT_STREQ("/foo", fs.GetDirectory().GetCString());
@@ -116,30 +115,30 @@ TEST(FileSpecTest, CopyByAppendingPathCo
 }
 
 TEST(FileSpecTest, PrependPathComponent) {
-  FileSpec fs_posix("foo", false, FileSpec::Style::posix);
+  FileSpec fs_posix("foo", FileSpec::Style::posix);
   fs_posix.PrependPathComponent("/bar");
   EXPECT_STREQ("/bar/foo", fs_posix.GetCString());
 
-  FileSpec fs_posix_2("foo/bar", false, FileSpec::Style::posix);
+  FileSpec fs_posix_2("foo/bar", FileSpec::Style::posix);
   fs_posix_2.PrependPathComponent("/baz");
   EXPECT_STREQ("/baz/foo/bar", fs_posix_2.GetCString());
 
-  FileSpec fs_windows("baz", false, FileSpec::Style::windows);
+  FileSpec fs_windows("baz", FileSpec::Style::windows);
   fs_windows.PrependPathComponent("F:\\bar");
   EXPECT_STREQ("F:\\bar\\baz", fs_windows.GetCString());
 
-  FileSpec fs_posix_root("bar", false, FileSpec::Style::posix);
+  FileSpec fs_posix_root("bar", FileSpec::Style::posix);
   fs_posix_root.PrependPathComponent("/");
   EXPECT_STREQ("/bar", fs_posix_root.GetCString());
 
-  FileSpec fs_windows_root("bar", false, FileSpec::Style::windows);
+  FileSpec fs_windows_root("bar", FileSpec::Style::windows);
   fs_windows_root.PrependPathComponent("F:\\");
   EXPECT_STREQ("F:\\bar", fs_windows_root.GetCString());
 }
 
 TEST(FileSpecTest, EqualSeparator) {
-  FileSpec backward("C:\\foo\\bar", false, FileSpec::Style::windows);
-  FileSpec forward("C:/foo/bar", false, FileSpec::Style::windows);
+  FileSpec backward("C:\\foo\\bar", FileSpec::Style::windows);
+  FileSpec forward("C:/foo/bar", FileSpec::Style::windows);
   EXPECT_EQ(forward, backward);
 }
 
@@ -155,8 +154,8 @@ TEST(FileSpecTest, EqualDotsWindows) {
   };
 
   for (const auto &test : tests) {
-    FileSpec one(test.first, false, FileSpec::Style::windows);
-    FileSpec two(test.second, false, FileSpec::Style::windows);
+    FileSpec one(test.first, FileSpec::Style::windows);
+    FileSpec two(test.second, FileSpec::Style::windows);
     EXPECT_EQ(one, two);
   }
 }
@@ -171,8 +170,8 @@ TEST(FileSpecTest, EqualDotsPosix) {
   };
 
   for (const auto &test : tests) {
-    FileSpec one(test.first, false, FileSpec::Style::posix);
-    FileSpec two(test.second, false, FileSpec::Style::posix);
+    FileSpec one(test.first, FileSpec::Style::posix);
+    FileSpec two(test.second, FileSpec::Style::posix);
     EXPECT_EQ(one, two);
   }
 }
@@ -185,8 +184,8 @@ TEST(FileSpecTest, EqualDotsPosixRoot) {
   };
 
   for (const auto &test : tests) {
-    FileSpec one(test.first, false, FileSpec::Style::posix);
-    FileSpec two(test.second, false, FileSpec::Style::posix);
+    FileSpec one(test.first, FileSpec::Style::posix);
+    FileSpec two(test.second, FileSpec::Style::posix);
     EXPECT_EQ(one, two);
   }
 }
@@ -222,7 +221,7 @@ TEST(FileSpecTest, GetNormalizedPath) {
   for (auto test : posix_tests) {
     SCOPED_TRACE(llvm::Twine("test.first = ") + test.first);
     EXPECT_EQ(test.second,
-              FileSpec(test.first, false, FileSpec::Style::posix).GetPath());
+              FileSpec(test.first, FileSpec::Style::posix).GetPath());
   }
 
   std::pair<const char *, const char *> windows_tests[] = {
@@ -254,7 +253,7 @@ TEST(FileSpecTest, GetNormalizedPath) {
   };
   for (auto test : windows_tests) {
     EXPECT_EQ(test.second,
-              FileSpec(test.first, false, FileSpec::Style::windows).GetPath())
+              FileSpec(test.first, FileSpec::Style::windows).GetPath())
         << "Original path: " << test.first;
   }
 }
@@ -267,17 +266,17 @@ TEST(FileSpecTest, FormatFileSpec) {
   EXPECT_EQ("(empty)", llvm::formatv("{0:D}", F).str());
   EXPECT_EQ("(empty)", llvm::formatv("{0:F}", F).str());
 
-  F = FileSpec("C:\\foo\\bar.txt", false, win);
+  F = FileSpec("C:\\foo\\bar.txt", win);
   EXPECT_EQ("C:\\foo\\bar.txt", llvm::formatv("{0}", F).str());
   EXPECT_EQ("C:\\foo\\", llvm::formatv("{0:D}", F).str());
   EXPECT_EQ("bar.txt", llvm::formatv("{0:F}", F).str());
 
-  F = FileSpec("foo\\bar.txt", false, win);
+  F = FileSpec("foo\\bar.txt", win);
   EXPECT_EQ("foo\\bar.txt", llvm::formatv("{0}", F).str());
   EXPECT_EQ("foo\\", llvm::formatv("{0:D}", F).str());
   EXPECT_EQ("bar.txt", llvm::formatv("{0:F}", F).str());
 
-  F = FileSpec("foo", false, win);
+  F = FileSpec("foo", win);
   EXPECT_EQ("foo", llvm::formatv("{0}", F).str());
   EXPECT_EQ("foo", llvm::formatv("{0:F}", F).str());
   EXPECT_EQ("(empty)", llvm::formatv("{0:D}", F).str());
@@ -306,7 +305,7 @@ TEST(FileSpecTest, IsRelative) {
     "/foo/../.",
   };
   for (const auto &path: not_relative) {
-    FileSpec spec(path, false, FileSpec::Style::posix);
+    FileSpec spec(path, FileSpec::Style::posix);
     EXPECT_FALSE(spec.IsRelative());
   }
   llvm::StringRef is_relative[] = {
@@ -324,13 +323,13 @@ TEST(FileSpecTest, IsRelative) {
     "./foo/bar.c"
   };
   for (const auto &path: is_relative) {
-    FileSpec spec(path, false, FileSpec::Style::posix);
+    FileSpec spec(path, FileSpec::Style::posix);
     EXPECT_TRUE(spec.IsRelative());
   }
 }
 
 TEST(FileSpecTest, RemoveLastPathComponent) {
-  FileSpec fs_posix("/foo/bar/baz", false, FileSpec::Style::posix);
+  FileSpec fs_posix("/foo/bar/baz", FileSpec::Style::posix);
   EXPECT_STREQ("/foo/bar/baz", fs_posix.GetCString());
   EXPECT_TRUE(fs_posix.RemoveLastPathComponent());
   EXPECT_STREQ("/foo/bar", fs_posix.GetCString());
@@ -341,7 +340,7 @@ TEST(FileSpecTest, RemoveLastPathCompone
   EXPECT_FALSE(fs_posix.RemoveLastPathComponent());
   EXPECT_STREQ("/", fs_posix.GetCString());
 
-  FileSpec fs_posix_relative("./foo/bar/baz", false, FileSpec::Style::posix);
+  FileSpec fs_posix_relative("./foo/bar/baz", FileSpec::Style::posix);
   EXPECT_STREQ("foo/bar/baz", fs_posix_relative.GetCString());
   EXPECT_TRUE(fs_posix_relative.RemoveLastPathComponent());
   EXPECT_STREQ("foo/bar", fs_posix_relative.GetCString());
@@ -350,14 +349,14 @@ TEST(FileSpecTest, RemoveLastPathCompone
   EXPECT_FALSE(fs_posix_relative.RemoveLastPathComponent());
   EXPECT_STREQ("foo", fs_posix_relative.GetCString());
 
-  FileSpec fs_posix_relative2("./", false, FileSpec::Style::posix);
+  FileSpec fs_posix_relative2("./", FileSpec::Style::posix);
   EXPECT_STREQ(".", fs_posix_relative2.GetCString());
   EXPECT_FALSE(fs_posix_relative2.RemoveLastPathComponent());
   EXPECT_STREQ(".", fs_posix_relative2.GetCString());
   EXPECT_FALSE(fs_posix_relative.RemoveLastPathComponent());
   EXPECT_STREQ(".", fs_posix_relative2.GetCString());
 
-  FileSpec fs_windows("C:\\foo\\bar\\baz", false, FileSpec::Style::windows);
+  FileSpec fs_windows("C:\\foo\\bar\\baz", FileSpec::Style::windows);
   EXPECT_STREQ("C:\\foo\\bar\\baz", fs_windows.GetCString());
   EXPECT_TRUE(fs_windows.RemoveLastPathComponent());
   EXPECT_STREQ("C:\\foo\\bar", fs_windows.GetCString());

Modified: lldb/trunk/unittests/Utility/StructuredDataTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/StructuredDataTest.cpp?rev=345890&r1=345889&r2=345890&view=diff
==============================================================================
--- lldb/trunk/unittests/Utility/StructuredDataTest.cpp (original)
+++ lldb/trunk/unittests/Utility/StructuredDataTest.cpp Thu Nov  1 14:05:36 2018
@@ -35,11 +35,11 @@ TEST(StructuredDataTest, StringDump) {
 TEST(StructuredDataTest, ParseJSONFromFile) {
   Status status;
   auto object_sp = StructuredData::ParseJSONFromFile(
-      FileSpec("non-existing-file.json", false), status);
+      FileSpec("non-existing-file.json"), status);
   EXPECT_EQ(nullptr, object_sp);
 
   std::string input = GetInputFilePath("StructuredData-basic.json");
-  object_sp = StructuredData::ParseJSONFromFile(FileSpec(input, false), status);
+  object_sp = StructuredData::ParseJSONFromFile(FileSpec(input), status);
   ASSERT_NE(nullptr, object_sp);
 
   StreamString S;




More information about the lldb-commits mailing list