summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/GraphWriter.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2014-11-04 01:29:59 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2014-11-04 01:29:59 +0000
commitf9074b5a91d93f786a80039a2f4ba48bfcd269c2 (patch)
tree9fe851a1dc00aaaf39e6b744e3aedf6e337bff9a /llvm/lib/Support/GraphWriter.cpp
parent65ffd92f07799710f2501f8c223e1df4f379b08b (diff)
downloadbcm5719-llvm-f9074b5a91d93f786a80039a2f4ba48bfcd269c2.tar.gz
bcm5719-llvm-f9074b5a91d93f786a80039a2f4ba48bfcd269c2.zip
Use findProgramByName.
llvm-svn: 221221
Diffstat (limited to 'llvm/lib/Support/GraphWriter.cpp')
-rw-r--r--llvm/lib/Support/GraphWriter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Support/GraphWriter.cpp b/llvm/lib/Support/GraphWriter.cpp
index e68ee434dd5..3910b12da89 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;
OpenPOWER on IntegriCloud