diff options
Diffstat (limited to 'llvm/lib/Support/GraphWriter.cpp')
-rw-r--r-- | llvm/lib/Support/GraphWriter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Support/GraphWriter.cpp b/llvm/lib/Support/GraphWriter.cpp index e68ee43..3910b12 100644 --- a/llvm/lib/Support/GraphWriter.cpp +++ b/llvm/lib/Support/GraphWriter.cpp @@ -105,9 +105,11 @@ struct GraphSession { SmallVector<StringRef, 8> parts; Names.split(parts, "|"); for (auto Name : parts) { - ProgramPath = sys::FindProgramByName(Name); - if (!ProgramPath.empty()) + auto P = sys::findProgramByName(Name); + if (P) { + ProgramPath = *P; return true; + } Log << " Tried '" << Name << "'\n"; } return false; |