[Lldb-commits] [lldb] r348232 - [PlatformDarwin] Simplify logic and use FileSystem
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 3 18:23:16 PST 2018
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
More information about the lldb-commits
mailing list