Fix the build for LLVM changes

llvm-svn: 221286
This commit is contained in:
Enrico Granata 2014-11-04 19:33:45 +00:00
parent 5cd8df6d1d
commit 404ab37e8b
1 changed files with 4 additions and 1 deletions

View File

@ -504,7 +504,10 @@ FileSpec::ResolveExecutableLocation ()
if (file_cstr)
{
const std::string file_str (file_cstr);
std::string path = llvm::sys::FindProgramByName (file_str);
llvm::ErrorOr<std::string> error_or_path = llvm::sys::findProgramByName (file_str);
if (!error_or_path)
return false;
std::string path = error_or_path.get();
llvm::StringRef dir_ref = llvm::sys::path::parent_path(path);
if (!dir_ref.empty())
{