forked from OSchip/llvm-project
Fixed bug reported by Ken Ryall. llvm-svn: 124231
This commit is contained in:
parent
624cef696d
commit
58f417180b
|
@ -497,7 +497,10 @@ FileSpec::ResolveExecutableLocation ()
|
|||
{
|
||||
if (!m_directory)
|
||||
{
|
||||
const std::string file_str (m_filename.AsCString());
|
||||
const char *file_cstr = m_filename.GetCString();
|
||||
if (file_cstr)
|
||||
{
|
||||
const std::string file_str (file_cstr);
|
||||
llvm::sys::Path path = llvm::sys::Program::FindProgramByName (file_str);
|
||||
const std::string &path_str = path.str();
|
||||
llvm::StringRef dir_ref = llvm::sys::path::parent_path(path_str);
|
||||
|
@ -524,6 +527,7 @@ FileSpec::ResolveExecutableLocation ()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue