summaryrefslogtreecommitdiff
path: root/lib/Support/GraphWriter.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
commit67c32a98315f785a9ec9d531c1f571a0196c7463 (patch)
tree4abb9cbeecc7901726dd0b4a37369596c852e9ef /lib/Support/GraphWriter.cpp
parent9f61947910e6ab40de38e6b4034751ef1513200f (diff)
Diffstat (limited to 'lib/Support/GraphWriter.cpp')
-rw-r--r--lib/Support/GraphWriter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Support/GraphWriter.cpp b/lib/Support/GraphWriter.cpp
index e68ee434dd59..054df528474e 100644
--- a/lib/Support/GraphWriter.cpp
+++ b/lib/Support/GraphWriter.cpp
@@ -105,9 +105,10 @@ struct GraphSession {
SmallVector<StringRef, 8> parts;
Names.split(parts, "|");
for (auto Name : parts) {
- ProgramPath = sys::FindProgramByName(Name);
- if (!ProgramPath.empty())
+ if (ErrorOr<std::string> P = sys::findProgramByName(Name)) {
+ ProgramPath = *P;
return true;
+ }
Log << " Tried '" << Name << "'\n";
}
return false;