diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-04 02:23:16 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-04 02:23:16 +0000 |
commit | 55840d10f50836b74c9d3a88f671a838d2af74cf (patch) | |
tree | 2dea17148027b4e7cf40210fcc7ff0f4c4460ccd /lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp | |
parent | 9d62f4db780d5c86f231d6ee957791f28abc67a7 (diff) | |
download | bcm5719-llvm-55840d10f50836b74c9d3a88f671a838d2af74cf.tar.gz bcm5719-llvm-55840d10f50836b74c9d3a88f671a838d2af74cf.zip |
[PlatformDarwin] Simplify logic and use FileSystem
Simplify code path by using the FileSystem.
llvm-svn: 348232
Diffstat (limited to 'lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp')
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index c9359df7f9c..30b035d444e 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 |