From: Jonas Devlieghere Date: Tue, 4 Dec 2018 02:23:16 +0000 (+0000) Subject: [PlatformDarwin] Simplify logic and use FileSystem X-Git-Tag: llvmorg-8.0.0-rc1~2968 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55840d10f50836b74c9d3a88f671a838d2af74cf;p=platform%2Fupstream%2Fllvm.git [PlatformDarwin] Simplify logic and use FileSystem Simplify code path by using the FileSystem. llvm-svn: 348232 --- 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