Author: jdevlieghere Date: Mon Dec 3 18:23:16 2018 New Revision: 348232 URL: http://llvm.org/viewvc/llvm-project?rev=348232&view=rev Log: [PlatformDarwin] Simplify logic and use FileSystem
Simplify code path by using the FileSystem. Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=348232&r1=348231&r2=348232&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Mon Dec 3 18:23:16 2018 @@ -190,25 +190,12 @@ FileSpecList PlatformDarwin::LocateExecu 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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits