[FileSpec] Make style argument mandatory for SetFile. NFC
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 13 Jun 2018 22:23:48 +0000 (22:23 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 13 Jun 2018 22:23:48 +0000 (22:23 +0000)
Fix SetFile uses in hosts that I missed in r334663.

llvm-svn: 334664

lldb/source/Host/freebsd/Host.cpp
lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
lldb/source/Host/linux/Host.cpp
lldb/source/Host/linux/HostInfoLinux.cpp
lldb/source/Host/netbsd/Host.cpp
lldb/source/Host/netbsd/HostInfoNetBSD.cpp
lldb/source/Host/openbsd/Host.cpp
lldb/source/Host/windows/FileSystem.cpp
lldb/source/Host/windows/Host.cpp
lldb/source/Host/windows/HostInfoWindows.cpp
lldb/source/Host/windows/HostProcessWindows.cpp

index e118095..87552bc 100644 (file)
@@ -75,9 +75,11 @@ GetFreeBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr,
   size_t pathname_len = sizeof(pathname);
   mib[2] = KERN_PROC_PATHNAME;
   if (::sysctl(mib, 4, pathname, &pathname_len, NULL, 0) == 0)
-    process_info.GetExecutableFile().SetFile(pathname, false);
+    process_info.GetExecutableFile().SetFile(pathname, false,
+                                             FileSpec::Style::native);
   else
-    process_info.GetExecutableFile().SetFile(cstr, false);
+    process_info.GetExecutableFile().SetFile(cstr, false,
+                                             FileSpec::Style::native);
 
   if (!(match_info_ptr == NULL ||
         NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),
index 9c82fcc..4f79f62 100644 (file)
@@ -68,7 +68,7 @@ FileSpec HostInfoFreeBSD::GetProgramFileSpec() {
     if (sysctl(exe_path_mib, 4, NULL, &exe_path_size, NULL, 0) == 0) {
       char *exe_path = new char[exe_path_size];
       if (sysctl(exe_path_mib, 4, exe_path, &exe_path_size, NULL, 0) == 0)
-        g_program_filespec.SetFile(exe_path, false);
+        g_program_filespec.SetFile(exe_path, false, FileSpec::Style::native);
       delete[] exe_path;
     }
   }
index ed9a459..1a0eb76 100644 (file)
@@ -190,7 +190,8 @@ static bool GetProcessAndStatInfo(::pid_t pid,
     return false;
 
   process_info.SetProcessID(pid);
-  process_info.GetExecutableFile().SetFile(PathRef, false);
+  process_info.GetExecutableFile().SetFile(PathRef, false,
+                                           FileSpec::Style::native);
 
   llvm::StringRef Rest = Environ->getBuffer();
   while (!Rest.empty()) {
index 4df14cf..4983947 100644 (file)
@@ -187,7 +187,7 @@ FileSpec HostInfoLinux::GetProgramFileSpec() {
     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);
+      g_program_filespec.SetFile(exe_path, false, FileSpec::Style::native);
     }
   }
 
index 460bb49..bfd5a74 100644 (file)
@@ -70,7 +70,8 @@ static bool GetNetBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr,
   if (!cstr)
     return false;
 
-  process_info.GetExecutableFile().SetFile(cstr, false);
+  process_info.GetExecutableFile().SetFile(cstr, false,
+                                           FileSpec::Style::native);
 
   if (!(match_info_ptr == NULL ||
         NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),
index 428183b..11ac115 100644 (file)
@@ -89,7 +89,7 @@ FileSpec HostInfoNetBSD::GetProgramFileSpec() {
 
     len = sizeof(path);
     if (sysctl(name, __arraycount(name), path, &len, NULL, 0) != -1) {
-        g_program_filespec.SetFile(path, false);
+      g_program_filespec.SetFile(path, false, FileSpec::Style::native);
     }
   }
   return g_program_filespec;
index a15b708..49e9c29 100644 (file)
@@ -72,7 +72,8 @@ GetOpenBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr,
 
       cstr = data.GetCStr(&offset);
       if (cstr) {
-        process_info.GetExecutableFile().SetFile(cstr, false);
+        process_info.GetExecutableFile().SetFile(cstr, false,
+                                                 FileSpec::Style::native);
 
         if (!(match_info_ptr == NULL ||
               NameMatches(
index 02b7e55..9309b89 100644 (file)
@@ -75,7 +75,7 @@ Status FileSystem::Readlink(const FileSpec &src, FileSpec &dst) {
   else if (!llvm::convertWideToUTF8(buf.data(), path))
     error.SetErrorString(PATH_CONVERSION_ERROR);
   else
-    dst.SetFile(path, false);
+    dst.SetFile(path, false, FileSpec::Style::native);
 
   ::CloseHandle(h);
   return error;
index 53c4e5a..049c31b 100644 (file)
@@ -122,7 +122,7 @@ FileSpec Host::GetModuleFileSpecForHostAddress(const void *host_addr) {
   std::string path;
   if (!llvm::convertWideToUTF8(buffer.data(), path))
     return module_filespec;
-  module_filespec.SetFile(path, false);
+  module_filespec.SetFile(path, false, FileSpec::Style::native);
   return module_filespec;
 }
 
index cc38e0b..5f074c8 100644 (file)
@@ -97,7 +97,7 @@ FileSpec HostInfoWindows::GetProgramFileSpec() {
     ::GetModuleFileNameW(NULL, buffer.data(), buffer.size());
     std::string path;
     llvm::convertWideToUTF8(buffer.data(), path);
-    m_program_filespec.SetFile(path, false);
+    m_program_filespec.SetFile(path, false, FileSpec::Style::native);
   });
   return m_program_filespec;
 }
index 61e19ed..ce75c14 100644 (file)
@@ -57,7 +57,7 @@ Status HostProcessWindows::GetMainModule(FileSpec &file_spec) const {
   if (::GetProcessImageFileNameW(m_process, wpath.data(), wpath.size())) {
     std::string path;
     if (llvm::convertWideToUTF8(wpath.data(), path))
-      file_spec.SetFile(path, false);
+      file_spec.SetFile(path, false, FileSpec::Style::native);
     else
       error.SetErrorString("Error converting path to UTF-8");
   } else