diff options
Diffstat (limited to 'llvm/lib/Support/GraphWriter.cpp')
-rw-r--r-- | llvm/lib/Support/GraphWriter.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Support/GraphWriter.cpp b/llvm/lib/Support/GraphWriter.cpp index 3910b12da89..054df528474 100644 --- a/llvm/lib/Support/GraphWriter.cpp +++ b/llvm/lib/Support/GraphWriter.cpp @@ -105,8 +105,7 @@ struct GraphSession { SmallVector<StringRef, 8> parts; Names.split(parts, "|"); for (auto Name : parts) { - auto P = sys::findProgramByName(Name); - if (P) { + if (ErrorOr<std::string> P = sys::findProgramByName(Name)) { ProgramPath = *P; return true; } |