mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 04:14:03 +08:00
Missed a few places where we need to report unreadable executables.
<rdar://problem/17727734> llvm-svn: 215743
This commit is contained in:
@@ -287,10 +287,17 @@ PlatformFreeBSD::ResolveExecutable (const FileSpec &exe_file,
|
||||
|
||||
if (error.Fail() || !exe_module_sp)
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
if (exe_file.Readable())
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,10 +184,17 @@ PlatformKalimba::ResolveExecutable (const FileSpec &exe_file,
|
||||
|
||||
if (error.Fail() || !exe_module_sp)
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
if (exe_file.Readable())
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,10 +301,17 @@ PlatformLinux::ResolveExecutable (const FileSpec &exe_file,
|
||||
|
||||
if (error.Fail() || !exe_module_sp)
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
if (exe_file.Readable())
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,10 +273,17 @@ PlatformRemoteiOS::ResolveExecutable (const FileSpec &exe_file,
|
||||
|
||||
if (error.Fail() || !exe_module_sp)
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
if (exe_file.Readable())
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -238,10 +238,17 @@ PlatformiOSSimulator::ResolveExecutable (const FileSpec &exe_file,
|
||||
|
||||
if (error.Fail() || !exe_module_sp)
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
if (exe_file.Readable())
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -294,10 +294,17 @@ PlatformWindows::ResolveExecutable (const FileSpec &exe_file,
|
||||
|
||||
if (error.Fail() || !exe_module_sp)
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
if (exe_file.Readable())
|
||||
{
|
||||
error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
|
||||
exe_file.GetPath().c_str(),
|
||||
GetPluginName().GetCString(),
|
||||
arch_names.GetString().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
error.SetErrorStringWithFormat("'%s' is not readable", exe_file.GetPath().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user