Update the macOS implementation of ComputeClangResourceDirectory to
authorAdrian Prantl <aprantl@apple.com>
Tue, 12 Mar 2019 23:59:02 +0000 (23:59 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 12 Mar 2019 23:59:02 +0000 (23:59 +0000)
comply with the more pedantic TestPaths.py

llvm-svn: 355994

lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp

index 6b51531..b8d93c8 100644 (file)
@@ -98,7 +98,7 @@ bool lldb_private::ComputeClangResourceDirectory(FileSpec &lldb_shlib_spec,
                             "Developer/Toolchains/XcodeDefault.xctoolchain",
                             swift_clang_resource_dir);
     if (!verify || VerifyClangPath(clang_path)) {
-      file_spec.SetFile(clang_path.c_str(), FileSpec::Style::native);
+      file_spec.GetDirectory().SetString(clang_path.c_str());
       FileSystem::Instance().Resolve(file_spec);
       return true;
     }
@@ -113,7 +113,7 @@ bool lldb_private::ComputeClangResourceDirectory(FileSpec &lldb_shlib_spec,
       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(), FileSpec::Style::native);
+        file_spec.GetDirectory().SetString(clang_path.c_str());
         FileSystem::Instance().Resolve(file_spec);
         return true;
       }
@@ -126,7 +126,7 @@ bool lldb_private::ComputeClangResourceDirectory(FileSpec &lldb_shlib_spec,
 
   // Fall back to the Clang resource directory inside the framework.
   raw_path.append("LLDB.framework/Resources/Clang");
-  file_spec.SetFile(raw_path.c_str(), FileSpec::Style::native);
+  file_spec.GetDirectory().SetString(raw_path.c_str());
   FileSystem::Instance().Resolve(file_spec);
   return true;
 #endif // __APPLE__