summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/FileSpec.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-11-04 19:33:45 +0000
committerEnrico Granata <egranata@apple.com>2014-11-04 19:33:45 +0000
commit404ab37e8b57695091d274c58ba89f34f57e8843 (patch)
treef38a160b00228f3b46b19d2c41e7d31e472c0fed /lldb/source/Host/common/FileSpec.cpp
parent5cd8df6d1d1cedc164d1a11cba8d92de38eb3f79 (diff)
downloadbcm5719-llvm-404ab37e8b57695091d274c58ba89f34f57e8843.tar.gz
bcm5719-llvm-404ab37e8b57695091d274c58ba89f34f57e8843.zip
Fix the build for LLVM changes
llvm-svn: 221286
Diffstat (limited to 'lldb/source/Host/common/FileSpec.cpp')
-rw-r--r--lldb/source/Host/common/FileSpec.cpp5
1 files changed, 4 insertions, 1 deletions
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<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())
{
OpenPOWER on IntegriCloud