mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-26 21:38:13 +00:00
[PlatformDarwin] Simplify logic and use FileSystem
Simplify code path by using the FileSystem. llvm-svn: 348232
This commit is contained in:
parent
9d62f4db78
commit
55840d10f5
@ -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 (FileSystem::Instance().IsDirectory(sym_file)) {
|
||||
sym_file = Symbols::FindSymbolFileInBundle(sym_file, sym_spec.GetUUIDPtr(),
|
||||
sym_spec.GetArchitecturePtr());
|
||||
}
|
||||
|
||||
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()) {
|
||||
}
|
||||
}
|
||||
return error;
|
||||
return {};
|
||||
}
|
||||
|
||||
static lldb_private::Status
|
||||
|
Loading…
x
Reference in New Issue
Block a user