One small tweak to LocateExecutableScriptingResources - I
authorJason Molenda <jmolenda@apple.com>
Tue, 23 Apr 2019 01:13:27 +0000 (01:13 +0000)
committerJason Molenda <jmolenda@apple.com>
Tue, 23 Apr 2019 01:13:27 +0000 (01:13 +0000)
was still stat'ing the possibly-dSYM FileSpec before I
(more cheaply) checked the filepath for telltale dSYM
components.
<rdar://problem/50086007>

llvm-svn: 358939

lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

index c14cd1c..5602c0f 100644 (file)
@@ -80,9 +80,9 @@ FileSpecList PlatformDarwin::LocateExecutableScriptingResources(
           if (objfile) {
             FileSpec symfile_spec(objfile->GetFileSpec());
             if (symfile_spec && 
-                FileSystem::Instance().Exists(symfile_spec) && 
                 strcasestr (symfile_spec.GetPath().c_str(), 
-                        ".dSYM/Contents/Resources/DWARF") != nullptr) {
+                        ".dSYM/Contents/Resources/DWARF") != nullptr &&
+                FileSystem::Instance().Exists(symfile_spec)) {
               while (module_spec.GetFilename()) {
                 std::string module_basename(
                     module_spec.GetFilename().GetCString());