From 55840d10f50836b74c9d3a88f671a838d2af74cf Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 4 Dec 2018 02:23:16 +0000 Subject: [PATCH] [PlatformDarwin] Simplify logic and use FileSystem Simplify code path by using the FileSystem. llvm-svn: 348232 --- .../Plugins/Platform/MacOSX/PlatformDarwin.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index c9359df..30b035d 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -190,25 +190,12 @@ FileSpecList PlatformDarwin::LocateExecutableScriptingResources( Status PlatformDarwin::ResolveSymbolFile(Target &target, const ModuleSpec &sym_spec, FileSpec &sym_file) { - Status error; sym_file = sym_spec.GetSymbolFileSpec(); - - llvm::sys::fs::file_status st; - if (status(sym_file.GetPath(), st, false)) { - error.SetErrorString("Could not stat file!"); - return error; - } - - if (exists(st)) { - if (is_directory(st)) { - sym_file = Symbols::FindSymbolFileInBundle( - sym_file, sym_spec.GetUUIDPtr(), sym_spec.GetArchitecturePtr()); - } - } else { - if (sym_spec.GetUUID().IsValid()) { - } + if (FileSystem::Instance().IsDirectory(sym_file)) { + sym_file = Symbols::FindSymbolFileInBundle(sym_file, sym_spec.GetUUIDPtr(), + sym_spec.GetArchitecturePtr()); } - return error; + return {}; } static lldb_private::Status -- 2.7.4