[Lldb-commits] [lldb] r355994 - Update the macOS implementation of ComputeClangResourceDirectory to

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 12 16:59:03 PDT 2019


Author: adrian
Date: Tue Mar 12 16:59:02 2019
New Revision: 355994

URL: http://llvm.org/viewvc/llvm-project?rev=355994&view=rev
Log:
Update the macOS implementation of ComputeClangResourceDirectory to
comply with the more pedantic TestPaths.py

Modified:
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp

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=355994&r1=355993&r2=355994&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Tue Mar 12 16:59:02 2019
@@ -98,7 +98,7 @@ bool lldb_private::ComputeClangResourceD
                             "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::ComputeClangResourceD
       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::ComputeClangResourceD
 
   // 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__




More information about the lldb-commits mailing list