[Lldb-commits] [lldb] r221286 - Fix the build for LLVM changes

Enrico Granata egranata at apple.com
Tue Nov 4 11:33:46 PST 2014


Author: enrico
Date: Tue Nov  4 13:33:45 2014
New Revision: 221286

URL: http://llvm.org/viewvc/llvm-project?rev=221286&view=rev
Log:
Fix the build for LLVM changes

Modified:
    lldb/trunk/source/Host/common/FileSpec.cpp

Modified: lldb/trunk/source/Host/common/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileSpec.cpp?rev=221286&r1=221285&r2=221286&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/FileSpec.cpp (original)
+++ lldb/trunk/source/Host/common/FileSpec.cpp Tue Nov  4 13:33:45 2014
@@ -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())
             {





More information about the lldb-commits mailing list