[FileSystem] Remove Exists() from FileSpec

This patch removes the Exists method from FileSpec and updates its uses
with calls to the FileSystem.

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

llvm-svn: 345854
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 0d6a7b7..8f38517 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -2093,7 +2093,7 @@
         FileSpec homedir_dot_lldb(home_dir_path.c_str(), false);
         homedir_dot_lldb.AppendPathComponent(".lldbinit");
         homedir_dot_lldb.ResolvePath();
-        if (dot_lldb.Exists() &&
+        if (FileSystem::Instance().Exists(dot_lldb) &&
             dot_lldb.GetDirectory() != homedir_dot_lldb.GetDirectory()) {
           result.AppendErrorWithFormat(
               "There is a .lldbinit file in the current directory which is not "
@@ -2137,7 +2137,7 @@
                    "%s-%s", init_file_path.c_str(), program_name);
         init_file.SetFile(program_init_file_name, true,
                           FileSpec::Style::native);
-        if (!init_file.Exists())
+        if (!FileSystem::Instance().Exists(init_file))
           init_file.Clear();
       }
     }
@@ -2150,7 +2150,7 @@
   // actual broadcasting of the commands back to any appropriate listener (see
   // CommandObjectSource::Execute for more details).
 
-  if (init_file.Exists()) {
+  if (FileSystem::Instance().Exists(init_file)) {
     const bool saved_batch = SetBatchCommandMode(true);
     CommandInterpreterRunOptions options;
     options.SetSilent(true);
@@ -2351,7 +2351,7 @@
 void CommandInterpreter::HandleCommandsFromFile(
     FileSpec &cmd_file, ExecutionContext *context,
     CommandInterpreterRunOptions &options, CommandReturnObject &result) {
-  if (cmd_file.Exists()) {
+  if (FileSystem::Instance().Exists(cmd_file)) {
     StreamFileSP input_file_sp(new StreamFile());
 
     std::string cmd_file_path = cmd_file.GetPath();