Driver: Setup file and program search paths in tool chains.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67529 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index db08426..df71c97 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -920,15 +920,8 @@
return P;
}
- // As a last resort, always search in our directory before pulling
- // from the path.
- llvm::sys::Path P(Dir);
- P.appendComponent(Name);
- if (P.exists())
- return P;
-
- // Search path to increase accuracy of logging output.
- P = llvm::sys::Program::FindProgramByName(Name);
+ // If all else failed, search the path.
+ llvm::sys::Path P(llvm::sys::Program::FindProgramByName(Name));
if (!P.empty())
return P;