From 404ab37e8b57695091d274c58ba89f34f57e8843 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Tue, 4 Nov 2014 19:33:45 +0000 Subject: Fix the build for LLVM changes llvm-svn: 221286 --- lldb/source/Host/common/FileSpec.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lldb/source/Host/common/FileSpec.cpp') diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index 66c104503d4..0b21d19f8cf 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -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 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()) { -- cgit v1.2.3